summaryrefslogtreecommitdiffstats
path: root/Core/User/EntityUserProvider.php
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-03-07 18:17:46 +0100
committerJohannes M. Schmitt <schmittjoh@gmail.com>2011-03-10 10:25:32 +0100
commitf0335ae722034233c2f49179bc6a9bf8ada62633 (patch)
tree677ee84bc31216f3a7998e62fdc7838a2076fe4c /Core/User/EntityUserProvider.php
parentc224430de65547bc9a25293b6a8caf2b9029f05c (diff)
downloadsymfony-security-f0335ae722034233c2f49179bc6a9bf8ada62633.zip
symfony-security-f0335ae722034233c2f49179bc6a9bf8ada62633.tar.gz
symfony-security-f0335ae722034233c2f49179bc6a9bf8ada62633.tar.bz2
[Security] various changes, see below
- visibility changes from protected to private - AccountInterface -> UserInterface - SecurityContext::vote() -> SecurityContext::isGranted()
Diffstat (limited to 'Core/User/EntityUserProvider.php')
-rw-r--r--Core/User/EntityUserProvider.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/Core/User/EntityUserProvider.php b/Core/User/EntityUserProvider.php
index 58bcc45..61dd708 100644
--- a/Core/User/EntityUserProvider.php
+++ b/Core/User/EntityUserProvider.php
@@ -12,7 +12,7 @@
namespace Symfony\Component\Security\Core\User;
use Doctrine\ORM\EntityManager;
-use Symfony\Component\Security\Core\Exception\UnsupportedAccountException;
+use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
/**
@@ -25,9 +25,9 @@ use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
*/
class EntityUserProvider implements UserProviderInterface
{
- protected $class;
- protected $repository;
- protected $property;
+ private $class;
+ private $repository;
+ private $property;
public function __construct(EntityManager $em, $class, $property = null)
{
@@ -66,13 +66,13 @@ class EntityUserProvider implements UserProviderInterface
/**
* {@inheritDoc}
*/
- public function loadUserByAccount(AccountInterface $account)
+ public function loadUser(UserInterface $user)
{
- if (!$account instanceof $this->class) {
- throw new UnsupportedAccountException(sprintf('Instances of "%s" are not supported.', get_class($account)));
+ if (!$user instanceof $this->class) {
+ throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
}
- return $this->loadUserByUsername($account->getUsername());
+ return $this->loadUserByUsername($user->getUsername());
}
/**