| @@ 68-82 (lines=15) @@ | ||
| 65 | { |
|
| 66 | if (!empty($this->params)) { |
|
| 67 | return $this->findUserBy([$this->ldapUsernameAttr => $username]); |
|
| 68 | } else { |
|
| 69 | foreach ($this->paramSets as $paramSet) { |
|
| 70 | $this->driver->init($paramSet['driver']); |
|
| 71 | $this->params = $paramSet['user']; |
|
| 72 | $this->setLdapAttr(); |
|
| 73 | ||
| 74 | $user = $this->findUserBy([$this->ldapUsernameAttr => $username]); |
|
| 75 | if (false !== $user && $user instanceof UserInterface) { |
|
| 76 | return $user; |
|
| 77 | } |
|
| 78 | ||
| 79 | $this->params = []; |
|
| 80 | $this->setLdapAttr(); |
|
| 81 | } |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| @@ 103-117 (lines=15) @@ | ||
| 100 | $user = $this->hydrator->hydrate($entries[0]); |
|
| 101 | ||
| 102 | return $user; |
|
| 103 | } else { |
|
| 104 | foreach ($this->paramSets as $paramSet) { |
|
| 105 | $this->driver->init($paramSet['driver']); |
|
| 106 | $this->params = $paramSet['user']; |
|
| 107 | $this->setLdapAttr(); |
|
| 108 | ||
| 109 | $user = $this->findUserBy($criteria); |
|
| 110 | if (false !== $user && $user instanceof UserInterface) { |
|
| 111 | return $user; |
|
| 112 | } |
|
| 113 | ||
| 114 | $this->params = []; |
|
| 115 | $this->setLdapAttr(); |
|
| 116 | } |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|