--- a/inc/users.inc.php Sun Mar 30 11:00:36 2008 +0000
+++ b/inc/users.inc.php Sun Mar 30 11:46:45 2008 +0000
@@ -40,6 +40,9 @@
// Set current user ID.
$userid=$_SESSION['userid'];
+ $query = 'SELECT id FROM perm_items WHERE name='.$db->quote('user_is_ueberuser');
+ $ueberUserId = $db->queryOne($query);
+
// Find the template ID that this user has been assigned.
$query = "SELECT perm_templ
FROM users
@@ -50,7 +53,7 @@
$query = "SELECT id
FROM perm_templ_items
WHERE templ_id = " . $db->quote($templ_id) . "
- AND perm_id = '53'";
+ AND perm_id = ".$ueberUserId;
$result = $db->query($query);
if ( $result->numRows() > 0 ) {
return 1;