From 74f0e3723327fbfb1cd7a96865019ff791b41593 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 25 Mar 2018 20:42:38 +0200 Subject: Remove deprecated \OCP\User::userExists Signed-off-by: Roeland Jago Douma --- apps/user_ldap/tests/User_LDAPTest.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'apps/user_ldap') diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index 2b5952c9742..5a165305d58 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -491,10 +491,9 @@ class User_LDAPTest extends TestCase { private function getUsers($search = '', $limit = null, $offset = null) { $users = \OC::$server->getUserManager()->search($search, $limit, $offset); - $uids = []; - foreach ($users as $user) { - $uids[] = $user->getUID(); - } + $uids = array_map(function(IUser $user) { + return $user->getUID(); + }, $users); return $uids; } @@ -1098,7 +1097,7 @@ class User_LDAPTest extends TestCase { $this->assertEquals('Roland Deschain', $result); //empty displayname retrieved - $result = \OC::$server->getUserManager()->get('newyorker')->getDisplayName(); + $result = \OC::$server->getUserManager()->get('newyorker') === null ? 'newyorker' : \OC::$server->getUserManager()->get('newyorker')->getDisplayName(); $this->assertEquals('newyorker', $result); } -- cgit v1.2.3