public function find(Token $token)
    {
        $infos = $token->getIdentity();

        if ($infos->has(Identity::PROPERTY_EMAIL)) {
            return $this->repository->findByEmail($infos->get(Identity::PROPERTY_EMAIL));
        }

        return null;
    }
public function find(Token $token)
    {
        $infos = $token->getIdentity();

        if ($infos->has(Identity::PROPERTY_EMAIL)) {
            return $this->repository->findByEmail($infos->get(Identity::PROPERTY_EMAIL));
        }

        return null;
    }
public function find ( Token $ token ) { $ infos = $ token -> getIdentity ( ) ; if ( $ infos -> has ( Identity :: PROPERTY_EMAIL ) ) { return $ this -> repository -> findByEmail ( $ infos -> get ( Identity :: PROPERTY_EMAIL ) ) ; } return null ; }
Find a matching user given a token

@param Token $token

@return null|User

@throws NotAuthenticatedException In case the token is not authenticated.
Find a matching user given a token