diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-07-15 18:31:28 +0400 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-07-15 18:31:28 +0400 |
commit | e707e948577b927a28b86545d345e7b6c8606352 (patch) | |
tree | df7f5a1705e1ee4815f28f0d864b97026a32f849 /settings/users.php | |
parent | 0cb9f5e159b1588550830dda4b21010a0412bae9 (diff) |
subadmins can now add users
Diffstat (limited to 'settings/users.php')
-rw-r--r-- | settings/users.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/settings/users.php b/settings/users.php index e066956291b..60ffc337a72 100644 --- a/settings/users.php +++ b/settings/users.php @@ -19,20 +19,20 @@ $groups = array(); $isadmin = OC_Group::inGroup(OC_User::getUser(),'admin')?true:false; if($isadmin){ - $groups = OC_Group::getGroups(); + $accessiblegroups = OC_Group::getGroups(); $accessibleusers = OC_User::getUsers(); $subadmins = OC_SubAdmin::getAllSubAdmins(); }else{ - $groups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()); - $accessibleusers = OC_Group::usersInGroups($groups); + $accessiblegroups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()); + $accessibleusers = OC_Group::usersInGroups($accessiblegroups); $subadmins = false; } foreach($accessibleusers as $i){ - $users[] = array( "name" => $i, "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/),'quota'=>OC_Preferences::getValue($i,'files','quota','default')); + $users[] = array( "name" => $i, "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/),'quota'=>OC_Preferences::getValue($i,'files','quota','default'),'subadmin'=>implode(', ',OC_SubAdmin::getSubAdminsGroups($i))); } -foreach( $groups as $i ){ +foreach( $accessiblegroups as $i ){ // Do some more work here soon $groups[] = array( "name" => $i ); } @@ -55,7 +55,9 @@ if (\OC_App::isEnabled( "files_sharing" ) ) { $tmpl = new OC_Template( "settings", "users", "user" ); $tmpl->assign( "users", $users ); $tmpl->assign( "groups", $groups ); +$tmpl->assign( 'isadmin', $isadmin); $tmpl->assign( 'subadmins', $subadmins); +$tmpl->assign( 'numofgroups', count($accessiblegroups)); $tmpl->assign( 'quota_preset', $quotaPreset); $tmpl->assign( 'default_quota', $defaultQuota); $tmpl->assign( 'share_notice', $shareNotice); |