From 0940da5af2ade6070410005fc1c7410556182bfa Mon Sep 17 00:00:00 2001 From: secretr Date: Thu, 9 Aug 2012 06:10:31 +0000 Subject: [PATCH] xup controller fix --- e107_core/controllers/system/xup.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/e107_core/controllers/system/xup.php b/e107_core/controllers/system/xup.php index f92ed0ce9..4b2efc55e 100644 --- a/e107_core/controllers/system/xup.php +++ b/e107_core/controllers/system/xup.php @@ -21,19 +21,16 @@ class core_system_xup_controller extends eController var $backUrl = null; - public function __construct() + public function init() { //$back = 'system/xup/test'; - $this->backUrl = vartrue($_GET['back']) ? base64_decode($_GET['back']) : ""; + $this->backUrl = vartrue($_GET['back']) ? base64_decode($_GET['back']) : true; } - - public function actionSignup() { // echo 'Signup controller'; //$back = 'system/xup/test'; - $back = vartrue($_GET['back']) ? base64_decode($_GET['back']) : ""; // FIXME - pref for default XUP - e.g. Facebook, use it when GET is empty if(vartrue($_GET['provider'])) @@ -43,8 +40,6 @@ class core_system_xup_controller extends eController //$provider->setBackUrl(e107::getUrl()->create('system/xup/endpoint', array(), array('full' => true))); try { - - $provider->signup($this->backUrl); // redirect to test page is expected, if true - redirect to SITEURL } catch (Exception $e) @@ -55,17 +50,15 @@ class core_system_xup_controller extends eController return; } // print_a($provider->getUserProfile()); - return; + //return; } e107::getRedirect()->redirect(e107::getUrl()->create($this->backUrl)); } - - public function actionLogin() { - echo 'Login controller'; + //echo 'Login controller'; // FIXME - pref for default XUP - e.g. Facebook, use it when GET is empty if(vartrue($_GET['provider'])) @@ -85,13 +78,11 @@ class core_system_xup_controller extends eController return; } // print_a($provider->getUserProfile()); - return; + //return; } e107::getRedirect()->redirect(e107::getUrl()->create($this->backUrl)); } - - public function actionTest() { echo 'Login controller

'; @@ -111,8 +102,6 @@ class core_system_xup_controller extends eController echo '
Test signup with Facebook'; } - - public function actionEndpoint() { require_once( e_HANDLER."hybridauth/Hybrid/Auth.php" );