MDL-18518 user firstaccess - added suport to display user->firstaccess. Credit goes to Anthony Borrow!

Merged from 19_STABLE
This commit is contained in:
stronk7 2009-03-11 11:22:55 +00:00
parent 692e0c3395
commit 1263a0ff1d
4 changed files with 14 additions and 1 deletions

View file

@ -3099,6 +3099,10 @@ function authenticate_user_login($username, $password) {
$DB->set_field('user', 'auth', $auth, array('username'=>$username));
$user->auth = $auth;
}
if (empty($user->firstaccess)) { //prevent firstaccess from remaining 0 for manual account that never required confirmation
$DB->set_field('user','firstaccess', $user->timemodified, array('id' => $user->id));
$user->firstaccess = $user->timemodified;
}
update_internal_user_password($user, $password); // just in case salt or encoding were changed (magic quotes too one day)