Commit 0cd7ed99 authored by Robert Lyon's avatar Robert Lyon

Bug 1838908: Email info out of sync

When adding a non-primary email via:
 set_profile_field($userid, 'email', $email, TRUE);

we shouldn't set email field in usr table to this new email address
as the usr.email should be the primary address one

Change-Id: Id8e780f3d7efa3baaae6383932e825a9cceb5e46
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 9a0886fc
......@@ -840,7 +840,9 @@ class ArtefactTypeEmail extends ArtefactTypeProfileField {
'artefact' => $this->id,
)
);
update_record('usr', (object)array('email' => $this->title, 'id' => $this->owner));
if (!$principal) {
update_record('usr', (object)array('email' => $this->title, 'id' => $this->owner));
}
}
}
}
......
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