Commit 9db07a71 authored by David Surville's avatar David Surville
Browse files

Arrêt de l'utilisation de la fonction deprecated ModuleOptions::getLdapUsername()

parent d88c4df1
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for src/UnicaenAuthentification/Authentication/Adapter/Cas.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ class Cas extends AbstractAdapter
            ->setMessages(['Authentication successful.']);

        // recherche de l'individu dans l'annuaire LDAP (il existe forcément puisque l'auth CAS a réussi)
        $usernameAttribute = $this->getModuleOptions()->getLdapUsername();
        $usernameAttribute = $this->getModuleOptions()->getLdap()['username'];
        switch ($usernameAttribute) {
            case 'uid':
                $ldapPeople = $this->getLdapPeopleMapper()->findOneByUid($identity->getUsername());
+1 −1
Changes for src/UnicaenAuthentification/Authentication/Adapter/Ldap.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ class Ldap extends AbstractAdapter implements EventManagerAwareInterface
        }

        // recherche de l'individu dans l'annuaire LDAP
        $usernameAttribute = $this->getModuleOptions()->getLdapUsername();
        $usernameAttribute = $this->getModuleOptions()->getLdap()['username'];
        switch($usernameAttribute) {
            case 'uid':
                $ldapPeople = $this->getLdapPeopleMapper()->findOneByUid($this->usernameUsurpe ?: $username);
+1 −1
Changes for src/UnicaenAuthentification/Authentication/Storage/Ldap.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class Ldap extends AbstractStorage
        $sessionIdentity = $this->storage->read();
        $username = $sessionIdentity->getUsername();

        $usernameAttribute = $this->getModuleOptions()->getLdapUsername();
        $usernameAttribute = $this->getModuleOptions()->getLdap()['username'];
        switch($usernameAttribute) {
            case 'uid':
                $identity = $this->getMapper()->findOneByUid($username);
+1 −1
Changes for src/UnicaenAuthentification/Service/CasService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ class CasService
        error_reporting($oldErrorReporting);

        // recherche de l'individu dans l'annuaire LDAP (il existe forcément puisque l'auth CAS a réussi)
        $usernameAttribute = $this->getOptions()->getLdapUsername();
        $usernameAttribute = $this->getOptions()->getLdap()['username'];
        switch($usernameAttribute) {
            case 'uid':
                $ldapPeople = $this->getLdapPeopleMapper()->findOneByUid($identity);