mirror of
https://github.com/openvk/openvk
synced 2025-02-24 12:50:07 +03:00
fix(user): 500 if logged in as admin and when user was previously banned permanently
This commit is contained in:
parent
3afb44fd89
commit
24b8d6f7f1
1 changed files with 2 additions and 2 deletions
|
@ -1303,7 +1303,7 @@ class User extends RowModel
|
|||
$last_ban = end($bans);
|
||||
if (!$last_ban) return 0;
|
||||
|
||||
if ($last_ban->isPermanent()) return "permanent";
|
||||
if ($last_ban->isPermanent()) return "0";
|
||||
|
||||
$values = [0, 3600, 7200, 86400, 172800, 604800, 1209600, 3024000, 9072000];
|
||||
$response = 0;
|
||||
|
@ -1317,7 +1317,7 @@ class User extends RowModel
|
|||
break;
|
||||
} else if ($last_ban->getTime() >= $value) {
|
||||
if ($i < count($values)) continue;
|
||||
$response = "permanent";
|
||||
$response = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue