Commit 6905c539 authored by Robert Lyon's avatar Robert Lyon

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)
parent 96943aab
......@@ -1182,9 +1182,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
Markdown is supported
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