Commit be2c6e06 authored by Robert Lyon's avatar Robert Lyon

Bug 1749269: Fixing for update user via webservices for 16.10

behatnotneeded

Change-Id: Ieced2e34e4079781c300c4e5f50c5c13bfb12cf8
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 543bd4ad
......@@ -561,13 +561,13 @@ class mahara_user_external extends external_api {
$profilefields->{$field} = $user[$field];
}
}
// The student id and preferredname get saved as an artefact and to usr table
if (isset($user['studentid'])) {
$profilefields->studentid = $user['studentid'];
}
if (isset($user['preferredname'])) {
$profilefields->preferredname = $user['preferredname'];
// We need to update the following fields for both the usr and artefact tables
foreach (array('firstname', 'lastname', 'email', 'studentid', 'preferredname') as $field) {
if (isset($user[$field])) {
$profilefields->{$field} = $user[$field];
}
}
update_user($updated_user, $profilefields, $remoteuser);
}
db_commit();
......
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