From 3b7d2cb2fd40d744a2415a470b4e323d13dd1b63 Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 4 Dec 2006 00:11:05 +0000 Subject: Nav-Seiten durch Inserts ersetzt; Editor-Seiten jetzt in Templates. --- code/user.inc.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'code/user.inc.php') diff --git a/code/user.inc.php b/code/user.inc.php index 7c9b907..cc04268 100644 --- a/code/user.inc.php +++ b/code/user.inc.php @@ -73,13 +73,18 @@ } function IsAdmin($id = -1) { - if($id < 0) return ($this->uid != 0 && $this->gid == 0); + if($id < 0) return ($this->gid == -1); - return ($id != 0 && $this->GetGid($id) == 0); + return ($this->GetGid($id) == -1); + } + + function GetUid() { + return $this->uid; } function GetGid($id = -1) { if($id < 0) return $this->gid; + if($id == 0) return 0; $res = $GLOBALS['db']->Execute('SELECT gid FROM users WHERE id = ?', $id); -- cgit v1.2.3