diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 13:12:44 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-28 13:12:44 +0100 |
commit | 022a7b13b828fd1ffb4beb7f63cca45bf4ffff1e (patch) | |
tree | df5eab7ed14bc7c132ed4df5d3de0d3206c407fb | |
parent | 996b5cf36898a3b7644eca568df453b9d6cc4808 (diff) | |
download | nextcloud-server-022a7b13b828fd1ffb4beb7f63cca45bf4ffff1e.tar.gz nextcloud-server-022a7b13b828fd1ffb4beb7f63cca45bf4ffff1e.zip |
prepare user table to show and edit display names
-rw-r--r-- | lib/public/user.php | 2 | ||||
-rw-r--r-- | settings/templates/users.php | 7 | ||||
-rw-r--r-- | settings/users.php | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/lib/public/user.php b/lib/public/user.php index 411098ed5aa..de52055a4c5 100644 --- a/lib/public/user.php +++ b/lib/public/user.php @@ -62,7 +62,7 @@ class User { /**
* @brief Get a list of all display names
- * @returns array with all display names (key) and the correspondig uids (value)
+ * @returns array with all display names (value) and the correspondig uids (key)
*
* Get a list of all display names and user ids.
*/
diff --git a/settings/templates/users.php b/settings/templates/users.php index 44e9b5bafeb..64dce38ba31 100644 --- a/settings/templates/users.php +++ b/settings/templates/users.php @@ -79,6 +79,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>; <thead> <tr> <th id='headerName'><?php echo $l->t('Name')?></th> + <th id="headerDisplayName"><?php echo $l->t( 'Display Name' ); ?></th> <th id="headerPassword"><?php echo $l->t( 'Password' ); ?></th> <th id="headerGroups"><?php echo $l->t( 'Groups' ); ?></th> <?php if(is_array($_['subadmins']) || $_['subadmins']): ?> @@ -92,6 +93,10 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>; <?php foreach($_["users"] as $user): ?> <tr data-uid="<?php echo $user["name"] ?>"> <td class="name"><?php echo $user["name"]; ?></td> + <td class="displayName"><?php echo $user["displayName"]; ?> <img class="svg action" + src="<?php echo image_path('core', 'actions/rename.svg')?>" + alt="change display name" title="change display name"/> + </td> <td class="password"><span>●●●●●●●</span> <img class="svg action" src="<?php echo image_path('core', 'actions/rename.svg')?>" alt="set new password" title="set new password"/> @@ -157,7 +162,7 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>; </div> </td> <td class="remove"> - <?php if($user['uid']!=OC_User::getUser()):?> + <?php if($user['name']!=OC_User::getUser()):?> <a href="#" class="action delete" original-title="<?php echo $l->t('Delete')?>"> <img src="<?php echo image_path('core', 'actions/delete.svg') ?>" /> </a> diff --git a/settings/users.php b/settings/users.php index d779cc782ce..df7cf8ac1d5 100644 --- a/settings/users.php +++ b/settings/users.php @@ -42,7 +42,7 @@ $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 $displayName => $uid) { +foreach($accessibleusers as $uid => $displayName) { $quota=OC_Preferences::getValue($i, 'files', 'quota', 'default'); $isQuotaUserDefined=array_search($quota, $quotaPreset)===false && array_search($quota, array('none', 'default'))===false; @@ -52,8 +52,8 @@ foreach($accessibleusers as $displayName => $uid) { } $users[] = array( - "name" => $name, - "uid" => $uid, + "name" => $uid, + "displayName" => $displayName, "groups" => join( ", ", /*array_intersect(*/OC_Group::getUserGroups($uid)/*, OC_SubAdmin::getSubAdminsGroups(OC_User::getUser()))*/), 'quota'=>$quota, 'isQuotaUserDefined'=>$isQuotaUserDefined, |