Users may not receive the registration email after approval

Bug #1488697 reported by Son Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Son Nguyen
1.10
Fix Released
High
Unassigned
1.9
Fix Released
High
Unassigned
15.04
Fix Released
High
Unassigned
15.10
Fix Released
High
Son Nguyen

Bug Description

Version: master (15.10), 1.10, 15.04
Platform: any
Browser: any

When a registration is approved, an confirmed email will be sent to the user using the function email_user().
By mistake, the registration id is passed to the function as the user id in line #146, htdocs/admin/users/actionregistration.php
We need to unset this value

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5174

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5174
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/91cc873f0c42a237d5b9d6187b0526d194c01cc7
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 91cc873f0c42a237d5b9d6187b0526d194c01cc7
Author: Aaron Wells <email address hidden>
Date: Wed Aug 26 13:41:49 2015 +1200

Whitelist the $user properties sent to email_user() (Bug 1488697)

The old code passes every value from the form into email_user(), which
has wound up causing problems because email_user() thinks $user->id
refers to the user's ID, but in our case id refers to the usr_registration
record. (There is no user created yet at this point)

behatnotneeded: No infrastructure to test email yet

Change-Id: I0d862c2d1b2fdba5d5a1dc0068ce594207ecace9

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5209

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/5222

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.9_STABLE" branch: https://reviews.mahara.org/5223

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5209
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/9ff91d4824b5c55b7be6ba920288290b905ac68f
Submitter: Son Nguyen (<email address hidden>)
Branch: 15.04_STABLE

commit 9ff91d4824b5c55b7be6ba920288290b905ac68f
Author: Aaron Wells <email address hidden>
Date: Wed Aug 26 13:41:49 2015 +1200

Whitelist the $user properties sent to email_user() (Bug 1488697)

The old code passes every value from the form into email_user(), which
has wound up causing problems because email_user() thinks $user->id
refers to the user's ID, but in our case id refers to the usr_registration
record. (There is no user created yet at this point)

behatnotneeded: No infrastructure to test email yet

Change-Id: I0d862c2d1b2fdba5d5a1dc0068ce594207ecace9

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5222
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/9898e9677a8c04b4b5ac44c201b08fc7185003df
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.10_STABLE

commit 9898e9677a8c04b4b5ac44c201b08fc7185003df
Author: Aaron Wells <email address hidden>
Date: Wed Aug 26 13:41:49 2015 +1200

Whitelist the $user properties sent to email_user() (Bug 1488697)

The old code passes every value from the form into email_user(), which
has wound up causing problems because email_user() thinks $user->id
refers to the user's ID, but in our case id refers to the usr_registration
record. (There is no user created yet at this point)

behatnotneeded: No infrastructure to test email yet

Change-Id: I0d862c2d1b2fdba5d5a1dc0068ce594207ecace9
(cherry picked from commit 91cc873f0c42a237d5b9d6187b0526d194c01cc7)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5223
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/12aa21ec26cfcc49bb6647b4e0fbc619ef981e94
Submitter: Son Nguyen (<email address hidden>)
Branch: 1.9_STABLE

commit 12aa21ec26cfcc49bb6647b4e0fbc619ef981e94
Author: Aaron Wells <email address hidden>
Date: Wed Aug 26 13:41:49 2015 +1200

Whitelist the $user properties sent to email_user() (Bug 1488697)

The old code passes every value from the form into email_user(), which
has wound up causing problems because email_user() thinks $user->id
refers to the user's ID, but in our case id refers to the usr_registration
record. (There is no user created yet at this point)

behatnotneeded: No infrastructure to test email yet

Change-Id: I0d862c2d1b2fdba5d5a1dc0068ce594207ecace9
(cherry picked from commit 91cc873f0c42a237d5b9d6187b0526d194c01cc7)

Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.