[wip] code smell, psr-12, mvc, other, forgot by 1 year.
This commit is contained in:
@@ -54,13 +54,13 @@ class Moderation
|
||||
public static function blockUser(int $target)
|
||||
{
|
||||
self::addEffectStatusToUserLog($target, "Блокировка");
|
||||
Db::getInstance()->execute('UPDATE battles.users SET block = 1 WHERE id = ?', $target);
|
||||
Db::getInstance()->execute('UPDATE users SET block = 1 WHERE id = ?', $target);
|
||||
}
|
||||
|
||||
public static function unBlockUser(int $target)
|
||||
{
|
||||
self::addEffectStatusToUserLog($target, "Блокировка" . self::STATUS_OFF);
|
||||
Db::getInstance()->execute('UPDATE battles.users SET block = 0 WHERE block = 1 AND id = ?', $target);
|
||||
Db::getInstance()->execute('UPDATE users SET block = 0 WHERE block = 1 AND id = ?', $target);
|
||||
}
|
||||
|
||||
public static function addToUserLog(int $target, string $message, int $senderId)
|
||||
|
||||
Reference in New Issue
Block a user