Installing a site doesn't update email correctly

Bug #1761037 reported by Robert Lyon on 2018-04-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Unassigned
16.10
High
Unassigned
17.04
High
Unassigned
17.10
High
Unassigned
18.04
High
Unassigned
18.10
High
Unassigned

Bug Description

We added a bit of code that made sure that when we install a site it changes the admin email from <email address hidden> to the one supplied in all 3 places where we save email addresses - we save this directly to db.

This is ok if we then log out before going to a place in Mahara where $USER->commit() is called

But if we don't the $USER object still has <email address hidden> set so overwrites our change in the usr table.

We need to commit this change via the USER object rather than update the usr table directly

Reviewed: https://reviews.mahara.org/8769
Committed: https://git.mahara.org/mahara/mahara/commit/4adf4a015e4ecb0130292849eb19d162b391daa2
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 4adf4a015e4ecb0130292849eb19d162b391daa2
Author: Robert Lyon <email address hidden>
Date: Wed Apr 4 14:19:53 2018 +1200

Bug 1761037: Commit the email update on first install correctly

Rather than update db directly - we need to update the USER object

behatnotneeded

Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/8770
Committed: https://git.mahara.org/mahara/mahara/commit/6905c539a4d0b36a0fe56a10c2d0963c43bc1240
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit 6905c539a4d0b36a0fe56a10c2d0963c43bc1240
Author: Robert Lyon <email address hidden>
Date: Wed Apr 4 14:19:53 2018 +1200

Bug 1761037: Commit the email update on first install correctly

Rather than update db directly - we need to update the USER object

behatnotneeded

Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 4adf4a015e4ecb0130292849eb19d162b391daa2)

Mahara Bot (dev-mahara) wrote :

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/8772

Mahara Bot (dev-mahara) wrote :

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/8773

Reviewed: https://reviews.mahara.org/8773
Committed: https://git.mahara.org/mahara/mahara/commit/13d5f9a5ba768bffaaef61ccff4abc066e7bb053
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 13d5f9a5ba768bffaaef61ccff4abc066e7bb053
Author: Robert Lyon <email address hidden>
Date: Wed Apr 4 14:19:53 2018 +1200

Bug 1761037: Commit the email update on first install correctly

Rather than update db directly - we need to update the USER object

behatnotneeded

Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 4adf4a015e4ecb0130292849eb19d162b391daa2)
(cherry picked from commit 6905c539a4d0b36a0fe56a10c2d0963c43bc1240)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8772
Committed: https://git.mahara.org/mahara/mahara/commit/0653aa293ac817f72c0f203475d7e9daf4cc9bd3
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 0653aa293ac817f72c0f203475d7e9daf4cc9bd3
Author: Robert Lyon <email address hidden>
Date: Wed Apr 4 14:19:53 2018 +1200

Bug 1761037: Commit the email update on first install correctly

Rather than update db directly - we need to update the USER object

behatnotneeded

Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 4adf4a015e4ecb0130292849eb19d162b391daa2)
(cherry picked from commit 6905c539a4d0b36a0fe56a10c2d0963c43bc1240)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/8771
Committed: https://git.mahara.org/mahara/mahara/commit/d4842eddd02bededa9847bfc2dddec8b6fc60d9e
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.10_STABLE

commit d4842eddd02bededa9847bfc2dddec8b6fc60d9e
Author: Robert Lyon <email address hidden>
Date: Wed Apr 4 14:19:53 2018 +1200

Bug 1761037: Commit the email update on first install correctly

Rather than update db directly - we need to update the USER object

behatnotneeded

Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 4adf4a015e4ecb0130292849eb19d162b391daa2)
(cherry picked from commit 6905c539a4d0b36a0fe56a10c2d0963c43bc1240)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers