Commit 0653aa29 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1761037: Commit the email update on first install correctly

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


Change-Id: I31f8c6759dd621439c90ddc0f0dc8a344359d5d9
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit 4adf4a01)
(cherry picked from commit 6905c539)
parent 49a9e1f8
......@@ -1060,9 +1060,10 @@ function requiredfields_submit(Pieform $form, $values) {
$oldemail = get_field('usr', 'email', 'id', $USER->get('id'));
if ($oldemail == '') {
// we are dealing with the dummy email that is set on install
update_record('usr', array('email' => $email), array('id' => $USER->get('id')));
update_record('artefact_internal_profile_email', array('email' => $email), array('owner' => $USER->get('id')));
update_record('artefact', array('title' => $email), array('owner' => $USER->get('id'), 'artefacttype' => 'email'));
$USER->email = $email;
// Check if a validation email has been sent, if not send one
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment