social_login_config_manager = new social_login_config(e107::getConfig()); } public function init() { $this->backUrl = isset($_GET['back']) ? $_GET['back'] : null; } public function actionLogin() { $allow = true; $session = e107::getSession(); if($session->get('HAuthError')) { $allow = false; $session->set('HAuthError', null); } if($allow && vartrue($_GET['provider'])) { $provider = e107::getUserProvider($_GET['provider']); try { $provider->login($this->backUrl, true, false); // redirect to test page is expected, if true - redirect to SITEURL } catch (Exception $e) { e107::getMessage()->addError('['.$e->getCode().']'.$e->getMessage(), 'default', true); } } e107::getRedirect()->redirect(true === $this->backUrl ? SITEURL : $this->backUrl); } public function actionTest() { require_once(e_PLUGIN . "social/includes/social_login_config.php"); $manager = new social_login_config(e107::getConfig()); if (!$manager->isFlagActive($manager::ENABLE_BIT_TEST_PAGE)) { e107::getRedirect()->redirect(SITEURL); return; } echo '