Commit a7729dfd authored by Mark Harding's avatar Mark Harding

(chore): fix faux users being made on logins

parent 587452ad
No related merge requests found
Pipeline #66711558 (#762) running with stages
......@@ -1145,18 +1145,14 @@ function set_last_action($user_guid) {
/**
* Sets the last logon time of the given user to right now.
*
* @param int $user_guid The user GUID
* @param User $User
*
* @return void
*/
function set_last_login($user_guid) {
$user_guid = (int) $user_guid;
global $CONFIG;
$time = time();
function set_last_login($user) {
$time = time();
$user = new ElggUser($user_guid);
$user->last_login = $time;
$user->ip = $_SERVER['REMOTE_ADDR'];
$user->save();
//execute_delayed_write_query($query);
}
$user->last_login = $time;
$user->ip = $_SERVER['REMOTE_ADDR'];
$user->save();
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment