mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:10:13 +00:00
Improved assigning of "last-activity" and "login_date"
This commit is contained in:
parent
dc96a72173
commit
72e045e744
4 changed files with 25 additions and 42 deletions
|
@ -183,10 +183,7 @@ class BasicAuth
|
|||
throw new UnauthorizedException("This API requires login");
|
||||
}
|
||||
|
||||
// Don't refresh the login date more often than twice a day to spare database writes
|
||||
$login_refresh = strcmp(DateTimeFormat::utc('now - 12 hours'), $record['login_date']) > 0;
|
||||
|
||||
DI::auth()->setForUser($a, $record, false, false, $login_refresh);
|
||||
DI::auth()->setForUser($a, $record, false, false, false);
|
||||
|
||||
Hook::callAll('logged_in', $record);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue