summaryrefslogtreecommitdiffstats
path: root/lib/util.php
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-07-15 16:31:28 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-07-15 16:31:28 +0200
commite707e948577b927a28b86545d345e7b6c8606352 (patch)
treedf7f5a1705e1ee4815f28f0d864b97026a32f849 /lib/util.php
parent0cb9f5e159b1588550830dda4b21010a0412bae9 (diff)
downloadnextcloud-server-e707e948577b927a28b86545d345e7b6c8606352.tar.gz
nextcloud-server-e707e948577b927a28b86545d345e7b6c8606352.zip
subadmins can now add users
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/util.php b/lib/util.php
index de9171edc8e..2eb102dfa69 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -328,16 +328,13 @@ class OC_Util {
// Check if we are a user
self::checkLoggedIn();
if(OC_Group::inGroup(OC_User::getUser(),'admin')){
- return OC_Group::getGroups();
+ return true;
}
- $stmt = OC_DB::prepare('SELECT COUNT(*) as count FROM *PREFIX*group_admin WHERE uid = ?');
- $result = $stmt->execute(array(OC_User::getUser()));
- $result = $result->fetchRow();
- if($result['count'] == 0){
+ if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())){
header( 'Location: '.OC_Helper::linkToAbsolute( '', 'index.php' ));
exit();
}
- return $groups;
+ return true;
}
/**