diff --git a/tests/acceptance/features/bootstrap/Provisioning.php b/tests/acceptance/features/bootstrap/Provisioning.php index f837850e0a52..6ce698440a69 100644 --- a/tests/acceptance/features/bootstrap/Provisioning.php +++ b/tests/acceptance/features/bootstrap/Provisioning.php @@ -85,7 +85,7 @@ public function getCreatedGroups() { * returns the display name of the current user * if no "Display Name" is set the user-name is returned instead * - * @return array + * @return string */ public function getCurrentUserDisplayName() { return $this->getUserDisplayName($this->getCurrentUser()); @@ -97,14 +97,15 @@ public function getCurrentUserDisplayName() { * * @param string $username * - * @return array + * @return string */ public function getUserDisplayName($username) { - $displayName = $this->createdUsers[$username]['displayname']; - if (($displayName === null) || ($displayName === '')) { - $displayName = $username; + if (isset($this->createdUsers[$username]['displayname'])) { + if ($this->createdUsers[$username]['displayname'] != '') { + return $this->createdUsers[$username]['displayname']; + } } - return $displayName; + return $username; } /**