дебаг личного дела

This commit is contained in:
lopar 2020-07-05 20:43:20 +03:00
parent 2db9a2b3e5
commit 8e1cd8cc63

View File

@ -11,10 +11,10 @@ const ADMINISTRATOR_ACCESS = 2;
function private_access($uid)
{
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = "?s"', $uid)->fetch_assoc();
if ($own['admin'] === 1) {
$own = db::c()->query('SELECT `align`,`admin` FROM `users` WHERE `id` = ?i', $uid)->fetch_assoc();
if ($own['admin'] == 1) {
return ADMINISTRATOR_ACCESS;
} elseif ($own['align'] === 1) {
} elseif ($own['align'] == 1) {
return MODERATOR_ACCESS;
}
return false;