battles/classes/Battles/Admin/User.php
Ivor Barhansky 0398425205 Code smell.
2022-12-17 03:03:56 +02:00

21 lines
520 B
PHP

<?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;
}
}