MDL-57383 tool_uploaduser: don't overwrite auth during update.
If updating users during upload along with the option to fill in missing fields from file content, then we should exclude the auth column because it will always be present for a user.
This commit is contained in:
@@ -692,7 +692,11 @@ class process {
|
||||
$dologout = false;
|
||||
|
||||
if ($this->get_update_type() != UU_UPDATE_NOCHANGES and !$remoteuser) {
|
||||
if (!empty($user->auth) and $user->auth !== $existinguser->auth) {
|
||||
|
||||
// Handle 'auth' column separately, the field can never be missing from a user.
|
||||
if (!empty($user->auth) && ($user->auth !== $existinguser->auth) &&
|
||||
($this->get_update_type() != UU_UPDATE_MISSING)) {
|
||||
|
||||
$this->upt->track('auth', s($existinguser->auth).'-->'.s($user->auth), 'info', false);
|
||||
$existinguser->auth = $user->auth;
|
||||
if (!isset($this->supportedauths[$user->auth])) {
|
||||
|
||||
Reference in New Issue
Block a user