Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-28386 Authentication Fixing user id issue with logs when a new us…

…er is added
  • Loading branch information...
commit a92ed77229ee9ab62db1870eea42a27470552880 1 parent ad52027
@ekirving ekirving authored ankitagarwal committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  user/editadvanced.php
View
3  user/editadvanced.php
@@ -139,7 +139,6 @@
$userform->set_data($user);
if ($usernew = $userform->get_data()) {
- add_to_log($course->id, 'user', 'update', "view.php?id=$user->id&course=$course->id", '');
if (empty($usernew->auth)) {
//user editing self
@@ -161,6 +160,7 @@
$usernew->password = hash_internal_user_password($usernew->newpassword);
$usernew->id = $DB->insert_record('user', $usernew);
$usercreated = true;
+ add_to_log($course->id, 'user', 'add', "view.php?id=$usernew->id&course=$course->id", '');
} else {
$usernew = file_postupdate_standard_editor($usernew, 'description', $editoroptions, $usercontext, 'user', 'profile', 0);
@@ -171,6 +171,7 @@
$DB->update_record('user', $user);
print_error('cannotupdateuseronexauth', '', '', $user->auth);
}
+ add_to_log($course->id, 'user', 'update', "view.php?id=$user->id&course=$course->id", '');
//set new password if specified
if (!empty($usernew->newpassword)) {
Please sign in to comment.
Something went wrong with that request. Please try again.