mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Possible fix for HybridAuth issues
This commit is contained in:
@@ -3875,7 +3875,7 @@ class e107
|
||||
exit();
|
||||
}
|
||||
|
||||
if(($key == "QUERY_STRING") && empty($_GET['hauth_done']) && ( // exception for hybridAuth.
|
||||
if(($key == "QUERY_STRING") && empty($_GET['hauth_done']) && empty($_GET['hauth.done']) && ( // exception for hybridAuth.
|
||||
strpos(strtolower($input),"=http")!==FALSE
|
||||
|| strpos(strtolower($input),strtolower("http%3A%2F%2F"))!==FALSE
|
||||
))
|
||||
|
@@ -65,6 +65,14 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2
|
||||
&& property_exists($email, 'email')
|
||||
) {
|
||||
$this->user->profile->email = $email->email;
|
||||
|
||||
// record whether the email address is verified
|
||||
if (property_exists($email, 'verified')
|
||||
&& true === $email->verified
|
||||
) {
|
||||
$this->user->profile->emailVerified = $email->email;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -89,7 +97,7 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2
|
||||
$contacts = array();
|
||||
try {
|
||||
$response = $this->api->api( "user/followers" );
|
||||
} catch (LinkedInException $e) {
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("User contacts request failed! {$this->providerId} returned an error: $e");
|
||||
}
|
||||
//
|
||||
@@ -97,7 +105,7 @@ class Hybrid_Providers_GitHub extends Hybrid_Provider_Model_OAuth2
|
||||
foreach ($response as $contact) {
|
||||
try {
|
||||
$contactInfo = $this->api->api( "users/".$contact->login );
|
||||
} catch (LinkedInException $e) {
|
||||
} catch (Exception $e) {
|
||||
throw new Exception("Contact info request failed for user {$contact->login}! {$this->providerId} returned an error: $e");
|
||||
}
|
||||
//
|
||||
|
@@ -63,8 +63,13 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID
|
||||
{
|
||||
$apiUrl = 'http://steamcommunity.com/profiles/' . $this->user->profile->identifier . '/?xml=1';
|
||||
|
||||
$data = @file_get_contents($apiUrl);
|
||||
$data = @ new SimpleXMLElement($data);
|
||||
try {
|
||||
$data = @file_get_contents($apiUrl);
|
||||
$data = @ new SimpleXMLElement($data);
|
||||
} catch(Exception $e) {
|
||||
Hybrid_Logger::error( "Steam::getUserProfileLegacyAPI() error: ", $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_object($data)) {
|
||||
return false;
|
||||
@@ -76,7 +81,7 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID
|
||||
$this->user->profile->profileURL = 'http://steamcommunity.com/id/' . (string) $data->customURL . '/';
|
||||
}
|
||||
else {
|
||||
$this->user->profile->profileURL = "http://steamcommunity.com/profiles/{$this->user->profile->identifier}/";
|
||||
$this->user->profile->profileURL = "http://steamcommunity.com/profiles/{$this->user->profile->identifier}/";
|
||||
}
|
||||
|
||||
$this->user->profile->webSiteURL = "";
|
||||
@@ -99,6 +104,5 @@ class Hybrid_Providers_Steam extends Hybrid_Provider_Model_OpenID
|
||||
$this->user->profile->region = property_exists($data, 'location') ? (string)$data->location : '';
|
||||
$this->user->profile->city = "";
|
||||
$this->user->profile->zip = "";
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user