Example #1
0
 public function __construct($name = null, $class = null, $title = null)
 {
     parent::__construct();
     $this->client = Mage::getSingleton('le_sociallogin/twitter_client');
     if (!$this->client->isEnabled()) {
         return;
     }
     $this->userInfo = Mage::registry('le_sociallogin_twitter_userinfo');
     if (!($redirect = Mage::getSingleton('customer/session')->getBeforeAuthUrl())) {
         $redirect = Mage::helper('core/url')->getCurrentUrl();
     }
     // Redirect uri
     Mage::getSingleton('core/session')->setTwitterRedirect($redirect);
 }
Example #2
0
 public function __construct($name = null, $class = null, $title = null)
 {
     parent::__construct();
     $this->client = Mage::getSingleton('le_sociallogin/linkedin_client');
     if (!$this->client->isEnabled()) {
         return;
     }
     $this->userInfo = Mage::registry('le_sociallogin_linkedin_userinfo');
     //        // CSRF protection
     //        Mage::getSingleton('core/session')->setLinkedinCsrf($csrf = md5(uniqid(rand(), TRUE)));
     //        $this->client->setState($csrf);
     if (!($redirect = Mage::getSingleton('customer/session')->getBeforeAuthUrl())) {
         $redirect = Mage::helper('core/url')->getCurrentUrl();
     }
     // Redirect uri
     Mage::getSingleton('core/session')->setLinkedinRedirect($redirect);
 }