function Member() { parent::Base_Controller(); $this->email = $this->_Authentication(); if (empty($this->subdomain)) { exit('This controller is only for subdomains.'); } // This controller is only for subdomains. if (!$this->isOwnerOfSite() && !$this->isMemberOfSite() && $this->uri->segment(2) != 'create') { exit('You cannot access this controller.'); } // Only members and owner can access this controller. $this->userSettings = $userSettings = $this->User_is_member_of_site_model->getWhere(array('user_id' => $this->getUserId(), 'site_id' => $this->subdomainId), 1); if (!empty($userSettings)) { if ($userSettings[0]['facebook_pics_y_n'] == 1 || $userSettings[0]['facebook_vids_y_n'] == 1) { $this->facebook = new Facebook($this->facebookApiKey, $this->facebookAppSecret); try { $this->fbUserId = $this->facebook->api_client->users_getLoggedInUser(); $this->facebook->require_login(); //$facebook->require_frame(); } catch (Exception $ex) { // user needs to link with facebook $this->flashMsg = "You need to link with Facebook. <a href='http://" . $_SERVER['HTTP_HOST'] . "/member/settings/'>Go to settings and link.</a>"; } } } $this->isSiteOwner = $this->isOwnerOfSite(); //print "<pre>"; var_dump($this->facebook->api_client->users_getLoggedInUser()); print "</pre>"; //print "<pre>"; var_dump($this->fbUserId); print "</pre>"; /*var_dump($this->subdomain); var_dump($this->subdomainId); var_dump($this->isMemberOfSite());*/ }
public function __construct() { parent::Base_Controller(); $this->paymentsProcessHelper = new PaymentsProcessHelper($this); $this->doctrine = new DoctrineHelper($this); $this->log = \Logger::getLogger(paymentsProcessingLogger); }
function Welcome() { parent::Base_Controller(); $this->_Authentication(); if (!empty($this->username) && !empty($this->subdomain)) { redirect('http://' . $_SERVER['HTTP_HOST'] . '/member'); } //if logged in redirect to activity }
function Fbmember() { parent::Base_Controller(); //$this->subdomain = 'x'; //$_sitedata = $this->Site_model->getWhere('subdomain = '.$this->subdomain,1); //$this->subdomainId = $_sitedata[0]['id']; //$this->facebook = new Facebook($this->facebookApiKey,$this->facebookAppSecret); //$this->fbUserId = $this->facebook->api_client->users_getLoggedInUser(); //$_userdata = $this->User_model->getWhere('fb_user_id = '.$this->fbUserId,1); //check userdata, if zero - there is no user with such facebookid - so, this user not linked with facebook //$this->userSettings = $userSettings = $this->User_is_member_of_site_model->getWhere(array('user_id' => $_userdata[0]['id'], 'site_id' => $this->subdomainId), 1); }
function Site() { parent::Base_Controller(); }
function __construct() { parent::Base_Controller(FALSE); $this->em =& get_em_instance(); $this->load->helper('file'); }
function Signin() { parent::Base_Controller(); }
function Fbconnect_test() { parent::Base_Controller(); }