FOS\UserBundle\Model\UserManager::loadUserByUsername PHP Method

loadUserByUsername() public method

It is strongly discouraged to call this method manually as it bypasses all ACL checks.
public loadUserByUsername ( string $username ) : Symfony\Component\Security\Core\User\AccountInterface
$username string
return Symfony\Component\Security\Core\User\AccountInterface
    public function loadUserByUsername($username)
    {
        $user = $this->findUserByUsername($username);
        if (!$user) {
            throw new UsernameNotFoundException(sprintf('No user with name "%s" was found.', $username));
        }
        return $user;
    }