1
0
Fork 0

Avoid 'Undefined array key "last-activity"'

This commit is contained in:
Michael 2022-12-01 06:12:13 +00:00
parent 8e0196fec3
commit 146f874c2e

View file

@ -674,6 +674,10 @@ class User
public static function updateLastActivity(int $uid)
{
$user = User::getById($uid, ['last-activity']);
if (empty($user)) {
return;
}
$current_day = DateTimeFormat::utcNow('Y-m-d');
if ($user['last-activity'] != $current_day) {