Skip to content

Commit

Permalink
bug #19204 [Security] Allow LDAP loadUser override (tucksaun)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.1 branch.

Discussion
----------

[Security] Allow LDAP loadUser override

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Back to 3.0, one could extend `Symfony\Component\Security\Core\User\LdapUserProvider` and override how User objects are created.
Among several improvements, #17560 changed `loadUser` signature but also visibility to `private` which disallow any overriding.
Even if the signature BC break is legitimate, we should still be able to override this method IMHO, which is not possible with a private visibility.
This PRs introduces a `protected` visibility to allow again overriding.

Commits
-------

ae99aa8 [Security] Allow LDAP loadUser override
  • Loading branch information
fabpot committed Jun 29, 2016
2 parents cef1915 + ae99aa8 commit 7b2af2d
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -111,7 +111,7 @@ public function supportsClass($class)
*
* @return User
*/
private function loadUser($username, Entry $entry)
protected function loadUser($username, Entry $entry)
{
$password = $this->getPassword($entry);

Expand Down

0 comments on commit 7b2af2d

Please sign in to comment.