diff --git a/lib/public/user.php b/lib/public/user.php index 411098ed5aa4b58c13302ba628cb421fa4878c49..de52055a4c5cd488992f4bbc0781e193c2e1f120 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 44e9b5bafeb86a17128a973abe0df395a260a677..64dce38ba317f29fe4ea759636ef78fcc711eeba 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 d779cc782ce5fca8b705b26ecb01423733a7da64..df7cf8ac1d5f2b9c747f84a4872d4f2d9ca7cb6f 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,