Админка: отображение невидимок уехало в новый класс. Отвязка от functions.php.
This commit is contained in:
20
classes/Battles/Admin/User.php
Normal file
20
classes/Battles/Admin/User.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Battles\Admin;
|
||||
|
||||
use Battles\Database\Db;
|
||||
|
||||
class User
|
||||
{
|
||||
private const INVISIBILITY_EFFECT = 1022;
|
||||
|
||||
public static function getInvisiblesList(): string
|
||||
{
|
||||
$list = '';
|
||||
$row = Db::getInstance()->ofetchAll('select id, login from users left join users_effects ue on users.id = ue.owner_id where type = ' . self::INVISIBILITY_EFFECT);
|
||||
foreach ($row as $item) {
|
||||
$list .= '[id] = ' . $item->id . ', ' . $item->login . '<br>';
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user