/** * finish login step */ function loginFinish() { parent::loginFinish(); $uid = str_replace("http://steamcommunity.com/openid/id/", "", $this->user->profile->identifier); if ($uid) { $data = @file_get_contents("http://steamcommunity.com/profiles/{$uid}/?xml=1"); $data = @new SimpleXMLElement($data); if (!is_object($data)) { return false; } $this->user->profile->displayName = (string) $data->{'steamID'}; $this->user->profile->photoURL = (string) $data->{'avatarMedium'}; $this->user->profile->description = (string) $data->{'summary'}; $realname = (string) $data->{'realname'}; if ($realname) { $this->user->profile->displayName = $realname; } $customURL = (string) $data->{'customURL'}; if ($customURL) { $this->user->profile->profileURL = "http://steamcommunity.com/id/{$customURL}/"; } // restore the user profile Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user); } }
/** * finish login step */ function loginFinish() { parent::loginFinish(); $this->user->profile->emailVerified = $this->user->profile->email; // restore the user profile Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user); }
/** * finish login step */ function loginFinish() { parent::loginFinish(); $this->user->profile->profileURL = $this->user->profile->identifier; // https://ru.wargaming.net/id/5069690-Steel_Master/ $this->user->profile->identifier = preg_replace('/^[^0-9]+([0-9]+)-.+$/', '$1', $this->user->profile->identifier); // restore the user profile Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user); }
function loginFinish() { parent::loginFinish(); $this->user->profile->identifier = str_ireplace("http://steamcommunity.com/openid/id/", "", $this->user->profile->identifier); if (!$this->user->profile->identifier) { throw new Exception("Authentication failed! {$this->providerId} returned an invalid user ID.", 5); } // If API key is not provided, use legacy API methods if (!empty($this->config['keys']['key'])) { $this->getUserProfileWebAPI($this->config['keys']['key']); } else { $this->getUserProfileLegacyAPI(); } Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user); }
/** * finish login step */ function loginFinish() { parent::loginFinish(); $this->user->profile->identifier = str_ireplace("http://steamcommunity.com/openid/id/", "", $this->user->profile->identifier); if (!$this->user->profile->identifier) { throw new Exception("Authentication failed! {$this->providerId} returned an invalid user ID.", 5); } // if api key is provided, we attempt to use steam web api if (isset(Hybrid_Auth::$config['providers']['Steam']['keys']['key']) && Hybrid_Auth::$config['providers']['Steam']['keys']['key']) { $userProfile = $this->getUserProfileWebAPI(Hybrid_Auth::$config['providers']['Steam']['keys']['key']); } else { $userProfile = $this->getUserProfileLegacyAPI(); } // fetch user profile foreach ($userProfile as $k => $v) { $this->user->profile->{$k} = $v ? $v : $this->user->profile->{$k}; } // store user profile Hybrid_Auth::storage()->set("hauth_session.{$this->providerId}.user", $this->user); }