public function loadUserByPublicKey($publicApiKey)
    {
        if (null === $user = $this->findOneBy(array('_api_key_public' => $publicApiKey))) {
            throw new UsernameNotFoundException(sprintf('Unknown public API key `%s`.', $publicApiKey));
        }

        return $this->checkActivatedStatus($user);
    }
public function loadUserByPublicKey($publicApiKey)
    {
        if (null === $user = $this->findOneBy(array('_api_key_public' => $publicApiKey))) {
            throw new UsernameNotFoundException(sprintf('Unknown public API key `%s`.', $publicApiKey));
        }

        return $this->checkActivatedStatus($user);
    }
public function loadUserByPublicKey ( $ publicApiKey ) { if ( null === $ user = $ this -> findOneBy ( array ( '_api_key_public' => $ publicApiKey ) ) ) { throw new UsernameNotFoundException ( sprintf ( 'Unknown public API key `%s`.' , $ publicApiKey ) ) ; } return $ this -> checkActivatedStatus ( $ user ) ; }
Loads the user for the given public API key.

@param string $publicApiKey The username

@return UserInterface

@throws UsernameNotFoundException if the user is not found
Loads the user for the given public API key .