Fix: regression in utils
This commit is contained in:
parent
b04b015a5d
commit
e0596395a0
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(dirname(__DIR__) . "/helpers/auth.php");
|
require_once(dirname(__DIR__) . "/helpers/auth.php");
|
||||||
|
require_once(ROOT_DIR . "/lang.php");
|
||||||
require_once(ROOT_DIR . "/helpers/track.php");
|
require_once(ROOT_DIR . "/helpers/track.php");
|
||||||
require_once(ROOT_DIR . "/helpers/utils.php");
|
require_once(ROOT_DIR . "/helpers/utils.php");
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(dirname(__DIR__) . "/helpers/auth.php");
|
require_once(dirname(__DIR__) . "/helpers/auth.php");
|
||||||
|
require_once(ROOT_DIR . "/lang.php");
|
||||||
require_once(ROOT_DIR . "/helpers/utils.php");
|
require_once(ROOT_DIR . "/helpers/utils.php");
|
||||||
|
|
||||||
$auth = new uAuth();
|
$auth = new uAuth();
|
||||||
@ -25,7 +26,7 @@
|
|||||||
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
|
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : NULL;
|
||||||
$login = isset($_REQUEST['login']) ? trim($_REQUEST['login']) : NULL;
|
$login = isset($_REQUEST['login']) ? trim($_REQUEST['login']) : NULL;
|
||||||
$pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL;
|
$pass = isset($_REQUEST['pass']) ? $_REQUEST['pass'] : NULL;
|
||||||
if (!$auth->isAuthenticated() || !$auth->isAdmin || $auth->user->login == $login || empty($action) || empty($login)) {
|
if (!$auth->isAuthenticated() || !$auth->isAdmin() || $auth->user->login == $login || empty($action) || empty($login)) {
|
||||||
uUtils::exitWithError($lang["servererror"]);
|
uUtils::exitWithError($lang["servererror"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user