Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (Revision 8477) +++ t3lib/class.t3lib_befunc.php (Arbeitskopie) @@ -1478,7 +1478,12 @@ public static function getUserNames($fields = 'username,usergroup,usergroup_cached_list,uid', $where = '') { $be_user_Array = Array(); - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_users', 'pid=0 ' . $where . self::deleteClause('be_users'), '', 'username'); + if ($GLOBALS['TCA']['be_users']['ctrl']['rootLevel'] > 0) { + $checkPid = 'pid=0 '; + } else { + $checkPid = '1=1 '; + } + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_users', $checkPid . $where . self::deleteClause('be_users'), '', 'username'); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $be_user_Array[$row['uid']] = $row; } @@ -1498,7 +1503,12 @@ public static function getGroupNames($fields = 'title,uid', $where = '') { $be_group_Array = Array(); - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_groups', 'pid=0 ' . $where . self::deleteClause('be_groups'), '', 'title'); + if ($GLOBALS['TCA']['be_groups']['ctrl']['rootLevel'] > 0) { + $checkPid = 'pid=0 '; + } else { + $checkPid = '1=1 '; + } + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, 'be_groups', $checkPid . $where . self::deleteClause('be_groups'), '', 'title'); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $be_group_Array[$row['uid']] = $row; } Index: t3lib/class.t3lib_beuserauth.php =================================================================== --- t3lib/class.t3lib_beuserauth.php (Revision 8477) +++ t3lib/class.t3lib_beuserauth.php (Arbeitskopie) @@ -148,6 +148,10 @@ * @return void */ function start() { + if ($GLOBALS['TCA'][$this->user_table]['ctrl']['rootLevel'] != 1) { + $this->enablecolumns['rootLevel'] = 0; + $this->checkPid = FALSE; + } $securityLevel = trim($GLOBALS['TYPO3_CONF_VARS']['BE']['loginSecurityLevel']); $this->security_level = $securityLevel ? $securityLevel : 'superchallenged'; Index: t3lib/stddb/tables.php =================================================================== --- t3lib/stddb/tables.php (Revision 8477) +++ t3lib/stddb/tables.php (Arbeitskopie) @@ -312,7 +312,7 @@ 'cruser_id' => 'cruser_id', 'delete' => 'deleted', 'adminOnly' => 1, // Only admin users can edit - 'rootLevel' => 1, + 'rootLevel' => 1, // 0: Can only exist in the page tree. 1: Can only exist in the root. -1: Can exist in both page tree and root. 'default_sortby' => 'ORDER BY admin, username', 'enablecolumns' => array( 'disabled' => 'disable', Index: typo3/db_new.php =================================================================== --- typo3/db_new.php (Revision 8477) +++ typo3/db_new.php (Arbeitskopie) @@ -676,10 +676,6 @@ return false; } } - // be_users and be_groups may not be created anywhere but in the root. - if ($checkTable=='be_users' || $checkTable=='be_groups') { - return false; - } // Checking doktype: $doktype = intval($pid_row['doktype']); if (!$allowedTableList = $PAGES_TYPES[$doktype]['allowedTables']) { Index: typo3/sysext/beuser/mod/index.php =================================================================== --- typo3/sysext/beuser/mod/index.php (Revision 8477) +++ typo3/sysext/beuser/mod/index.php (Arbeitskopie) @@ -563,7 +563,7 @@ * @return string */ function user_where_clause() { - return 'AND pid=0 '; + return ($GLOBALS['TCA']['be_users']['ctrl']['rootLevel'] > 0) ? 'AND pid=0 ' : ''; } /**