Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function loadUserByUsername($username)
 {
     /** @var User $user */
     $user = $this->userProvider->loadUserByUsername($username);
     if (!$user) {
         throw new UsernameNotFoundException(sprintf('El usuario "%s" no existe.', $username));
     }
     return $user;
 }
Esempio n. 2
0
 public function loadUserByUsername($username)
 {
     $parts = $this->emailParser->parse($username);
     $this->verifyDomain($parts['domain']);
     $user = parent::loadUserByUsername($username);
     return $user;
 }
Esempio n. 3
0
 /**
  * @expectedException Symfony\Component\Security\Core\Exception\UsernameNotFoundException
  */
 public function testLoadUserByInvalidUsername()
 {
     $this->userManager->expects($this->once())->method('findUserByUsername')->with('foobar')->will($this->returnValue(null));
     $this->userProvider->loadUserByUsername('foobar');
 }