Avoid 'Undefined array key "last-activity"'
This commit is contained in:
parent
8e0196fec3
commit
146f874c2e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user