diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-17 18:51:59 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-21 11:30:00 +0100 |
commit | a32d6e481faacee43f09fa02945a4ba04ffdae50 (patch) | |
tree | 21b074dc884dfafa0ac3c18431059f101debd32a /settings/Controller | |
parent | 6f4cb12be2d026c45237359e2b0eea2266b86bdf (diff) | |
download | nextcloud-server-a32d6e481faacee43f09fa02945a4ba04ffdae50.tar.gz nextcloud-server-a32d6e481faacee43f09fa02945a4ba04ffdae50.zip |
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/UsersController.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index 08d97a0f581..94f97a35613 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -603,8 +603,9 @@ class UsersController extends Controller { // keep the user back-end up-to-date with the latest display name and email // address - if (isset($data['displayName']['value']) && $user->getDisplayName() !== $data['displayName']['value']) { - $result = $user->setDisplayName($data['displayName']['value']); + $oldDisplayName = $user->getDisplayName(); + if (isset($data[AccountManager::PROPERTY_DISPLAYNAME]['value']) && $oldDisplayName !== $data[AccountManager::PROPERTY_DISPLAYNAME]['value']) { + $result = $user->setDisplayName($data[AccountManager::PROPERTY_DISPLAYNAME]['value']); if ($result === false) { throw new ForbiddenException($this->l10n->t('Unable to change full name')); } |