public function findUserByValidRefreshToken($token)
    {
        /** @var BaseUser $user */
        $user = $this->findOneBy(['refreshToken' => $token]);

        if (!empty($user) && $user->isRefreshTokenValid()) {
            return $user;
        }

        return null;
    }
public function findUserByValidRefreshToken($token)
    {
        /** @var BaseUser $user */
        $user = $this->findOneBy(['refreshToken' => $token]);

        if (!empty($user) && $user->isRefreshTokenValid()) {
            return $user;
        }

        return null;
    }
public function findUserByValidRefreshToken ( $ token ) { /** @var BaseUser $user */ $ user = $ this -> findOneBy ( [ 'refreshToken' => $ token ] ) ; if ( ! empty ( $ user ) && $ user -> isRefreshTokenValid ( ) ) { return $ user ; } return null ; }
Finds a user by refresh token that is not expired

@param $token
@return null|object|BaseUser
Finds a user by refresh token that is not expired