Browse files

merged branch elnur/chain-user-provider-getter (PR #7077)

This PR was merged into the master branch.

Discussion
----------

[2.3] [Security] Add a getter for providers to the ChainUserProvider class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes

I've got a use case where I need to check if any of the chained user providers implement a particular interface. This getter would really help with that.

Commits
-------

0a82d73 Add a getter for providers to the ChainUserProvider class
  • Loading branch information...
2 parents c9c687e + 0a82d73 commit b265c9ee0a2a2735682a83397d84bf33131ce02b @fabpot fabpot committed Apr 9, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/Symfony/Component/Security/Core/User/ChainUserProvider.php
View
8 src/Symfony/Component/Security/Core/User/ChainUserProvider.php
@@ -32,6 +32,14 @@ public function __construct(array $providers)
}
/**
+ * @return array
+ */
+ public function getProviders()
+ {
+ return $this->providers;
+ }
+
+ /**
* {@inheritDoc}
*/
public function loadUserByUsername($username)

0 comments on commit b265c9e

Please sign in to comment.