From c0555684f7c188cfed03c48cc01142416f5c933f Mon Sep 17 00:00:00 2001 From: Billy Date: Thu, 24 Oct 2019 12:49:41 +0100 Subject: [PATCH] Another attempt at fixing dn/uid --- src/LdapUser.php | 4 ++-- tests/LdapTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LdapUser.php b/src/LdapUser.php index 6300ca4..136729a 100644 --- a/src/LdapUser.php +++ b/src/LdapUser.php @@ -15,7 +15,7 @@ class LdapUser implements \ArrayAccess protected $phone; protected $validKeys = [ - 'uid' => 'username', + 'dn' => 'username', 'mail' => 'email', 'sn' => 'surname', 'givenname' => 'forenames', @@ -68,4 +68,4 @@ public function offsetGet($offset) { return $this->$offset; } -} \ No newline at end of file +} diff --git a/tests/LdapTest.php b/tests/LdapTest.php index dc20d1b..c9b53bd 100644 --- a/tests/LdapTest.php +++ b/tests/LdapTest.php @@ -81,7 +81,7 @@ public function can_convert_an_ldap_user_to_an_array() { $user = new LdapUser([ 0 => [ - 'uid' => [0 => 'validuser'], + 'dn' => [0 => 'validuser'], 'mail' => [0 => 'validuser@example.com'], 'sn' => [0 => 'surname'], 'givenname' => [0 => 'forenames'], @@ -124,4 +124,4 @@ protected function getPackageAliases($app) 'Ldap' => 'Ohffs\Ldap\LdapFacade' ]; } -} \ No newline at end of file +}