function getNumUsers() { if (!auth_enabled()) { return 9999; } $sql = dbconnect(); $fetchQ = $sql->prepare_statement("select uid from Users"); $fetchR = $sql->exec_statement($fetchQ); return $sql->num_rows($fetchR); }
function validateUserQuiet($auth, $sub = 'all') { if (!auth_enabled()) { return 'null'; } if (init_check()) { return 'init'; } $current_user = checkLogin(); if (!$current_user) { return false; } $groupPriv = checkGroupAuth($current_user, $auth, $sub); if ($groupPriv) { return $current_user; } $priv = checkAuth($current_user, $auth, $sub); if (!$priv) { return false; } return $current_user; }