1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00

Work on #34, extensive testing is required. Work in progress.

This commit is contained in:
SecretR
2012-12-20 10:45:22 +02:00
parent cfb76a758a
commit e89a6a5ecf
6 changed files with 61 additions and 39 deletions

View File

@@ -1491,11 +1491,19 @@ class e_user extends e_user_model
// don't allow if main admin browse front-end or there is already user session
if((!$deniedAs && $this->getSessionDataAs()) || null !== $this->_session_data || !e107::getPref('social_login_active', false)) return $this;
// detect all currently connected providers
$hybrid = e107::getHybridAuth(); // init the auth class
$connected = Hybrid_Auth::getConnectedProviders();
try
{
// detect all currently connected providers
$hybrid = e107::getHybridAuth(); // init the auth class
$connected = Hybrid_Auth::getConnectedProviders();
}
catch(Exception $e)
{
e107::getMessage()->addError('['.$e->getCode().']'.$e->getMessage(), 'default', true);
$session = e107::getSession();
$session->set('HAuthError', true);
$connected = false;
}
// no active session found
if(!$connected) return $this;