summaryrefslogtreecommitdiffstats
path: root/User
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-01-25 20:28:26 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-01-26 16:38:54 +0100
commit521c9f65e9d70618f63ac6ed803a495651b9fd35 (patch)
tree4e64bf3f877a4050eb3eb95c0b55630a4105053c /User
parentbff922f5c7ab61fb144e124b584da067842cb955 (diff)
downloadsymfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.zip
symfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.tar.gz
symfony-security-521c9f65e9d70618f63ac6ed803a495651b9fd35.tar.bz2
[Security] many improvements, and fixes
Diffstat (limited to 'User')
-rw-r--r--User/InMemoryUserProvider.php8
-rw-r--r--User/User.php1
-rw-r--r--User/UserProviderInterface.php15
3 files changed, 20 insertions, 4 deletions
diff --git a/User/InMemoryUserProvider.php b/User/InMemoryUserProvider.php
index e83f7fa..082e9c9 100644
--- a/User/InMemoryUserProvider.php
+++ b/User/InMemoryUserProvider.php
@@ -87,4 +87,12 @@ class InMemoryUserProvider implements UserProviderInterface
return $this->loadUserByUsername((string) $account);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function supportsClass($class)
+ {
+ return $class === 'Symfony\Component\Security\User\User';
+ }
}
diff --git a/User/User.php b/User/User.php
index 4885ca0..338d43c 100644
--- a/User/User.php
+++ b/User/User.php
@@ -119,7 +119,6 @@ class User implements AdvancedAccountInterface
*/
public function eraseCredentials()
{
- $this->password = null;
}
/**
diff --git a/User/UserProviderInterface.php b/User/UserProviderInterface.php
index 4e182ee..926f575 100644
--- a/User/UserProviderInterface.php
+++ b/User/UserProviderInterface.php
@@ -36,13 +36,22 @@ interface UserProviderInterface
* Loads the user for the account interface.
*
* It is up to the implementation if it decides to reload the user data
- * from the database, or if it simply merges the passed User into the
+ * from the database, or if it simply merges the passed User into the
* identity map of an entity manager.
*
* @throws UnsupportedAccountException if the account is not supported
- * @param AccountInterface $user
+ * @param AccountInterface $account
*
* @return AccountInterface
*/
- function loadUserByAccount(AccountInterface $user);
+ function loadUserByAccount(AccountInterface $account);
+
+ /**
+ * Whether this provider supports the given user class
+ *
+ * @param string $class
+ *
+ * @return Boolean
+ */
+ function supportsClass($class);
} \ No newline at end of file