Merged tidy from stable

This commit is contained in:
moodler 2005-07-21 16:44:44 +00:00
parent 860ddcb405
commit 00684b54cc

View File

@ -60,11 +60,15 @@
}
/// Are we admin logged in as someone else? If yes then we need to retain our real identity.
if (!empty($USER->realuser)) $realuser = $USER->realuser;
if (!empty($USER->realuser)) {
$realuser = $USER->realuser;
}
$USER = $user;
$USER = clone($user); // Get a fresh copy
if (!empty($realuser)) $USER->realuser = $realuser;
if (!empty($realuser)) {
$USER->realuser = $realuser;
}
// register success changing password
unset_user_preference('auth_forcepasswordchange');