protected function createUser($tokenCredentials) { $user = new User(); $user->setID($this->server->getUserUid($tokenCredentials)); $user->setName($this->server->getUserScreenName($tokenCredentials)); $user->setEmail($this->server->getUserEmail($tokenCredentials)); $user->setProperties($this->server->getUserDetails($tokenCredentials)->extra); return $user; }
protected function createUser($accessToken) { $resourceOwner = $this->provider->getResourceOwner($accessToken); $user = new User(); $user->setID($this->getUserID($resourceOwner)); $user->setName($this->getUserName($resourceOwner)); $user->setEmail($this->getUserEmail($resourceOwner)); $user->setProperties($resourceOwner->toArray()); return $user; }