Ejemplo n.º 1
0
 public function _construct()
 {
     parent::_construct();
     $this->client = Mage::getSingleton('inchoo_socialconnect/facebook_oauth2_client');
     if (!$this->client->isEnabled()) {
         return $this;
     }
 }
Ejemplo n.º 2
0
 protected function _construct()
 {
     parent::_construct();
     $this->client = Mage::getSingleton('inchoo_socialconnect/facebook_oauth2_client');
     if (!$this->client->isEnabled()) {
         return;
     }
     $this->userInfo = Mage::registry('inchoo_socialconnect_facebook_userinfo');
     $this->setTemplate('inchoo/socialconnect/facebook/account.phtml');
 }
Ejemplo n.º 3
0
 protected function _construct()
 {
     parent::_construct();
     $this->client = Mage::getSingleton('inchoo_socialconnect/facebook_oauth2_client');
     if (!$this->client->isEnabled()) {
         return;
     }
     $this->userInfo = Mage::registry('inchoo_socialconnect_facebook_userinfo');
     // CSRF protection
     Mage::getSingleton('core/session')->setFacebookCsrf($csrf = md5(uniqid(rand(), true)));
     $this->client->setState($csrf);
     Mage::getSingleton('customer/session')->setSocialConnectRedirect(Mage::helper('core/url')->getCurrentUrl());
     $this->setTemplate('inchoo/socialconnect/facebook/button.phtml');
 }