mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
official additioin + zero bonus
This commit is contained in:
@@ -730,6 +730,7 @@ function get_user_row($id)
|
||||
} else {
|
||||
$arr['__is_rainbow'] = 0;
|
||||
}
|
||||
$arr['__is_donor'] = is_donor($arr);
|
||||
return apply_filter("user_row", $arr);
|
||||
});
|
||||
|
||||
@@ -1031,3 +1032,8 @@ function user_can($permission, $fail = false, $uid = 0): bool
|
||||
}
|
||||
throw new \App\Exceptions\InsufficientPermissionException();
|
||||
}
|
||||
|
||||
function is_donor(array $userInfo): bool
|
||||
{
|
||||
return $userInfo['donor'] == 'yes' && ($userInfo['donoruntil'] === null || $userInfo['donoruntil'] == '0000-00-00 00:00:00' || $userInfo['donoruntil'] >= date('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user