} else if ($user->secret == $confirmsecret) { // They have provided the secret key to get in
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
- if ($user->firstaccess == 0) {
- $DB->set_field("user", "firstaccess", time(), array("id"=>$user->id));
- }
return AUTH_CONFIRM_OK;
}
} else {
return AUTH_CONFIRM_FAIL;
}
$user->confirmed = 1;
- if ($user->firstaccess == 0) {
- $user->firstaccess = time();
- }
user_update_user($user, false);
return AUTH_CONFIRM_OK;
}
return AUTH_CONFIRM_ALREADY;
} else {
$DB->set_field("user", "confirmed", 1, array("id"=>$user->id));
- if ($user->firstaccess == 0) {
- $DB->set_field("user", "firstaccess", time(), array("id"=>$user->id));
- }
return AUTH_CONFIRM_OK;
}
} else {
} See MDL-21327 for why this is commented out
*/
$remoteuser->mnethostid = $remotehost->id;
- $remoteuser->firstaccess = time(); // First time user in this server, grab it here
+ $remoteuser->firstaccess = 0;
$remoteuser->confirmed = 1;
$remoteuser->id = $DB->insert_record('user', $remoteuser);
}
$localuser->mnethostid = $remotepeer->id;
- if (empty($localuser->firstaccess)) { // Now firstaccess, grab it here
- $localuser->firstaccess = time();
- }
user_update_user($localuser, false);
if (!$firsttime) {
This files describes API changes in /auth/* - plugins,
information provided here is intended especially for developers.
+=== 2.9 ===
+
+* Do not update user->firstaccess from any auth plugin, the complete_user_login() does it automatically.
+
=== 2.8 ===
* \core\session\manager::session_exists() now verifies the session is active
} else if ($user = $mform_signup->get_data()) {
$user->confirmed = 0;
$user->lang = current_language();
- $user->firstaccess = time();
+ $user->firstaccess = 0;
$user->timecreated = time();
$user->mnethostid = $CFG->mnet_localhost_id;
$user->secret = random_string(15);