Commit c4475f39 authored by Mac Newbold's avatar Mac Newbold

Don't require a useless uid param for isadmin, but allow it.

parent e2c71224
......@@ -316,11 +316,13 @@ function LOGGEDINORDIE($uid, $modifier = 0) {
# in user that has to be admin. So ignore the uid and make sure
# there is a login status.
#
function ISADMIN($uid) {
function ISADMIN($uid = 1) {
global $CHECKLOGIN_STATUS;
if ($CHECKLOGIN_STATUS == CHECKLOGIN_NOSTATUS)
if ($CHECKLOGIN_STATUS == CHECKLOGIN_NOSTATUS) {
$uid=GETUID();
TBERROR("ISADMIN: $uid is not logged in!", 1);
}
return (($CHECKLOGIN_STATUS &
(CHECKLOGIN_LOGGEDIN|CHECKLOGIN_ISADMIN|CHECKLOGIN_ADMINOFF)) ==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment