diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-25 14:05:00 +0400 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-25 14:05:00 +0400 |
commit | 9bb8e0583995fff244432bc34820127ef8ff6ac6 (patch) | |
tree | e3294e6b26b148d2735aa30d07d167b4ed1c9c64 /settings | |
parent | 2fee1208eff1911ffcdbba24ea1e8543ed6ec26b (diff) |
get all display names
Diffstat (limited to 'settings')
-rw-r--r-- | settings/users.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/settings/users.php b/settings/users.php index 668d974693a..3706dc918c0 100644 --- a/settings/users.php +++ b/settings/users.php @@ -22,7 +22,7 @@ $isadmin = OC_User::isAdminUser(OC_User::getUser()); if($isadmin) { $accessiblegroups = OC_Group::getGroups(); - $accessibleusers = OC_User::getUsers('', 30); + $accessibleusers = OC_User::getDisplayNames('', 30); $subadmins = OC_SubAdmin::getAllSubAdmins(); }else{ $accessiblegroups = OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()); @@ -42,16 +42,21 @@ $defaultQuota=OC_Appconfig::getValue('files', 'default_quota', 'none'); $defaultQuotaIsUserDefined=array_search($defaultQuota, $quotaPreset)===false && array_search($defaultQuota, array('none', 'default'))===false; // load users and quota -foreach($accessibleusers as $i) { +foreach($accessibleusers as $displayName => $uid) { $quota=OC_Preferences::getValue($i, 'files', 'quota', 'default'); $isQuotaUserDefined=array_search($quota, $quotaPreset)===false && array_search($quota, array('none', 'default'))===false; + $name = $displayName; + if ( $displayName != $uid ) { + $name = $name . ' ('.$uid.')'; + } + $users[] = array( - "name" => $i, - "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($i)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/), + "name" => $name, + "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($uid)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/), 'quota'=>$quota, 'isQuotaUserDefined'=>$isQuotaUserDefined, - 'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($i))); + 'subadmin'=>implode(', ', OC_SubAdmin::getSubAdminsGroups($iuid))); } foreach( $accessiblegroups as $i ) { |