private function __construct()
 {
     global $objInit;
     $backOrFrontend = $objInit->mode;
     // TODO: Unused
     //        global $objFWUser;
     //        $langId;
     if ($backOrFrontend == "frontend") {
         $langId = $objInit->getFrontendLangId();
     } else {
         //backend
         $langId = $objInit->getBackendLangId();
     }
     $langCode = FWLanguage::getLanguageCodeById($langId);
     $this->setVariable(array('path' => ASCMS_PATH_OFFSET . '/' . $langCode . '/', 'basePath' => ASCMS_PATH_OFFSET . '/', 'cadminPath' => \Cx\Core\Core\Controller\Cx::instanciate()->getWebsiteBackendPath() . '/', 'mode' => $objInit->mode, 'language' => $langCode, 'csrf' => \Cx\Core\Csrf\Controller\Csrf::code()), 'contrexx');
     //let i18n set it's variables
     $i18n = new ContrexxJavascriptI18n($langCode);
     $i18n->variablesTo($this);
     //determine the correct jquery ui css' path.
     //the user might have overridden the default css in the theme, so look out for this too.
     $jQUiCssPath = 'themes/' . $objInit->getCurrentThemesPath() . '/jquery-ui.css';
     //customized css would be here
     if ($objInit->mode != 'frontend' || !file_exists(ASCMS_DOCUMENT_ROOT . '/' . $jQUiCssPath)) {
         //use standard css
         $jQUiCssPath = 'lib/javascript/jquery/ui/css/jquery-ui.css';
     }
     $this->setVariable(array('jQueryUiCss' => $jQUiCssPath), 'contrexx-ui');
 }
Example #2
0
 /**
  * Constructor   -> Create the module-menu and an internal template-object
  * @global   InitCMS
  * @global   \Cx\Core\Html\Sigma
  * @global   array
  */
 function __construct()
 {
     global $objInit, $objTemplate, $_CORELANG;
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Blog/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_intLanguageId = FRONTEND_LANG_ID;
     $objFWUser = \FWUser::getFWUserObject();
     $this->_intCurrentUserId = $objFWUser->objUser->getId();
     $strNavigation = '';
     $isAdmin = $objFWUser->objUser->getAdminStatus();
     //if(in_array(120, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
     $strNavigation .= '<a href="index.php?cmd=Blog" 
                 class="' . ($_GET['act'] == '' ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_MANAGE_TITLE'] . '</a>';
     //}
     if (in_array(121, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=addEntry" 
                 class="' . (in_array($_GET['act'], array('addEntry', 'editEntry')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_ENTRY_ADD_TITLE'] . '</a>';
     }
     if (in_array(122, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=manageCategory" 
                 class="' . (in_array($_GET['act'], array('manageCategory', 'manageCategory')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_CATEGORY_MANAGE_TITLE'] . '</a>';
     }
     if (in_array(125, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=networks" 
                 class="' . (in_array($_GET['act'], array('networks', 'editNetwork')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_NETWORKS_TITLE'] . '</a>';
     }
     if (in_array(124, $objFWUser->objUser->getStaticPermissionIds()) || $isAdmin) {
         $strNavigation .= '<a href="index.php?cmd=Blog&amp;act=settings" 
                 class="' . (in_array($_GET['act'], array('settings')) ? 'active' : '') . '">' . $_CORELANG['TXT_BLOG_SETTINGS_TITLE'] . '</a>';
     }
     $objTemplate->setVariable('CONTENT_NAVIGATION', $strNavigation);
 }
 public function preResolve(\Cx\Core\Routing\Url $url)
 {
     if ($this->cx->getMode() != \Cx\Core\Core\Controller\Cx::MODE_FRONTEND) {
         return;
     }
     $em = $this->cx->getDb()->getEntityManager();
     $rewriteRuleRepo = $em->getRepository($this->getNamespace() . '\\Model\\Entity\\RewriteRule');
     $rewriteRules = $rewriteRuleRepo->findAll(array(), array('order' => 'asc'));
     $last = false;
     $originalUrl = clone $url;
     foreach ($rewriteRules as $rewriteRule) {
         try {
             $url = $rewriteRule->resolve($url, $last);
         } catch (\Exception $e) {
             // This is thrown if the regex of the rule is not valid
         }
         if ($last) {
             break;
         }
     }
     if ($originalUrl->toString() != $url->toString()) {
         \Cx\Core\Csrf\Controller\Csrf::header('Location: ' . $url->toString(), true, $rewriteRule->getRewriteStatusCode());
         die;
     }
 }
Example #4
0
 /**
  * Login to facebook and get the associated cloudrexx user.
  */
 public function login()
 {
     $client = new \Google_Client();
     $client->setApplicationName('Contrexx Login');
     $client->setClientId($this->applicationData[0]);
     $client->setClientSecret($this->applicationData[1]);
     $client->setRedirectUri(\Cx\Lib\SocialLogin::getLoginUrl(self::OAUTH_PROVIDER));
     $client->setDeveloperKey($this->applicationData[2]);
     $client->setUseObjects(true);
     $client->setApprovalPrompt('auto');
     $client->setScopes(self::$scopes);
     self::$google = new \Google_Oauth2Service($client);
     self::$googleplus = new \Google_PlusService($client);
     if (isset($_GET['code'])) {
         try {
             $client->authenticate();
         } catch (\Google_AuthException $e) {
         }
     }
     if (!$client->getAccessToken()) {
         \Cx\Core\Csrf\Controller\Csrf::header('Location: ' . $client->createAuthUrl());
         exit;
     }
     self::$userdata = $this->getUserData();
     $this->getContrexxUser(self::$userdata['oauth_id']);
 }
Example #5
0
 /**
  * Redirects the browser to the noaccess webpage.
  *
  * @return void
  */
 public static function noAccess($redirect = null)
 {
     global $objInit;
     $objFWUser = FWUser::getFWUserObject();
     \Cx\Core\Csrf\Controller\Csrf::header('Location: ' . CONTREXX_DIRECTORY_INDEX . '?' . ($objInit->mode == 'backend' ? '' : 'section=Login&' . (!empty($redirect) ? 'redirect=' . $redirect . '&' : '')) . ($objFWUser->objUser->login() ? 'cmd=noaccess' : ''));
     exit;
 }
Example #6
0
 /**
  * PHP5 constructor
  *
  * @global \Cx\Core\Html\Sigma
  * @global array
  */
 function __construct()
 {
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/Alias/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
 /**
  * Load your component.
  * 
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page       The resolved page
  */
 public function load(\Cx\Core\ContentManager\Model\Entity\Page $page)
 {
     global $objTemplate, $sessionObj;
     switch ($this->cx->getMode()) {
         case \Cx\Core\Core\Controller\Cx::MODE_FRONTEND:
             if (!isset($sessionObj) || !is_object($sessionObj)) {
                 $sessionObj = \cmsSession::getInstance();
             }
             $objLogin = new \Cx\Core_Modules\Login\Controller\Login(\Env::get('cx')->getPage()->getContent());
             $pageTitle = \Env::get('cx')->getPage()->getTitle();
             $pageMetaTitle = \Env::get('cx')->getPage()->getMetatitle();
             \Env::get('cx')->getPage()->setContent($objLogin->getContent($pageMetaTitle, $pageTitle));
             break;
         case \Cx\Core\Core\Controller\Cx::MODE_BACKEND:
             if (\FWUser::getFWUserObject()->objUser->login(true)) {
                 \Cx\Core\Csrf\Controller\Csrf::header('location: index.php');
             }
             $this->cx->getTemplate()->addBlockfile('CONTENT_OUTPUT', 'content_master', 'LegacyContentMaster.html');
             $objTemplate = $this->cx->getTemplate();
             $objLoginManager = new \Cx\Core_Modules\Login\Controller\LoginManager();
             $objLoginManager->getPage();
             break;
         default:
             break;
     }
 }
 /**
  * Headlines constructor
  * 
  * @param string $pageContent Template content
  */
 function __construct($pageContent)
 {
     parent::__construct('.');
     $this->getSettings();
     $this->pageContent = $pageContent;
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
 }
 /**
  * constructor
  *
  * global    object    $objTemplate
  * global    array    $_ARRAYLANG
  */
 function __construct()
 {
     global $objTemplate, $_ARRAYLANG;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/NetTools/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
Example #10
0
 /**
  * Login to facebook and get the associated contrexx user.
  */
 public function login()
 {
     // fixing timestamp issue with twitter
     // it is necessary that the twitter server has the same time as our system
     date_default_timezone_set('UTC');
     $tmhOAuth = new \tmhOAuth(array('consumer_key' => $this->applicationData[0], 'consumer_secret' => $this->applicationData[1]));
     // set the timestamp
     $tmhOAuth->config['force_timestamp'] = true;
     $tmhOAuth->config['timestamp'] = time();
     if (isset($_GET['oauth_verifier'])) {
         $tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];
         $tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];
         $tmhOAuth->request('POST', $tmhOAuth->url('oauth/access_token', ''), array('oauth_verifier' => $_GET['oauth_verifier'], 'x_auth_access_type' => 'read'));
         $access_token = $tmhOAuth->extract_params($tmhOAuth->response['response']);
         $tmhOAuth->config['user_token'] = $access_token['oauth_token'];
         $tmhOAuth->config['user_secret'] = $access_token['oauth_token_secret'];
         $tmhOAuth->request('GET', $tmhOAuth->url('1.1/account/verify_credentials'));
         $resp = json_decode($tmhOAuth->response['response']);
         unset($_SESSION['oauth']);
         $name = explode(' ', $resp->name);
         self::$userdata = array('first_name' => $name[0], 'last_name' => $name[1], 'email' => $resp->screen_name . '@twitter.com');
         $this->getContrexxUser($resp->id);
     } else {
         $tmhOAuth->request('POST', $tmhOAuth->url('oauth/request_token', ""), array('oauth_callback' => \Cx\Lib\SocialLogin::getLoginUrl(self::OAUTH_PROVIDER)));
         $_SESSION['oauth'] = $tmhOAuth->extract_params($tmhOAuth->response['response']);
         $url = 'https://api.twitter.com/oauth/authenticate?oauth_token=' . $_SESSION['oauth']['oauth_token'];
         \Cx\Core\Csrf\Controller\Csrf::header("Location: " . $url);
         exit;
     }
 }
Example #11
0
 /**
  * Constructor
  * @global object $objTemplate
  * @global array $_ARRAYLANG
  */
 function __construct($pageContent)
 {
     $this->pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
 }
Example #12
0
 public function getPage($pos, $page_content)
 {
     global $_CONFIG, $_ARRAYLANG;
     $objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($objTpl);
     $objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $objTpl->setTemplate($page_content);
     $objTpl->setGlobalVariable($_ARRAYLANG);
     $term = isset($_REQUEST['term']) ? trim(contrexx_input2raw($_REQUEST['term'])) : '';
     if (strlen($term) >= 3) {
         $term = trim(contrexx_input2raw($_REQUEST['term']));
         $this->setTerm($term);
         $eventHandlerInstance = \Env::get('cx')->getEvents();
         $eventHandlerInstance->triggerEvent('SearchFindContent', array($this));
         if ($this->result->size() == 1) {
             $arraySearchResults[] = $this->result->toArray();
         } else {
             $arraySearchResults = $this->result->toArray();
         }
         usort($arraySearchResults, function ($a, $b) {
             if ($a['Score'] == $b['Score']) {
                 if (isset($a['Date'])) {
                     if ($a['Date'] == $b['Date']) {
                         return 0;
                     }
                     if ($a['Date'] > $b['Date']) {
                         return -1;
                     }
                     return 1;
                 }
                 return 0;
             }
             if ($a['Score'] > $b['Score']) {
                 return -1;
             }
             return 1;
         });
         $countResults = sizeof($arraySearchResults);
         if (!is_numeric($pos)) {
             $pos = 0;
         }
         $paging = getPaging($countResults, $pos, '&amp;section=Search&amp;term=' . contrexx_raw2encodedUrl($term), '<b>' . $_ARRAYLANG['TXT_SEARCH_RESULTS'] . '</b>', true);
         $objTpl->setVariable('SEARCH_PAGING', $paging);
         $objTpl->setVariable('SEARCH_TERM', contrexx_raw2xhtml($term));
         if ($countResults > 0) {
             $searchComment = sprintf($_ARRAYLANG['TXT_SEARCH_RESULTS_ORDER_BY_RELEVANCE'], contrexx_raw2xhtml($term), $countResults);
             $objTpl->setVariable('SEARCH_TITLE', $searchComment);
             $arraySearchOut = array_slice($arraySearchResults, $pos, $_CONFIG['corePagingLimit']);
             foreach ($arraySearchOut as $details) {
                 $objTpl->setVariable(array('COUNT_MATCH' => $_ARRAYLANG['TXT_RELEVANCE'] . ' ' . $details['Score'] . '%', 'LINK' => '<b><a href="' . $details['Link'] . '" title="' . contrexx_raw2xhtml($details['Title']) . '">' . contrexx_raw2xhtml($details['Title']) . '</a></b>', 'SHORT_CONTENT' => contrexx_raw2xhtml($details['Content'])));
                 $objTpl->parse('search_result');
             }
             return $objTpl->get();
         }
     }
     $noresult = $term != '' ? sprintf($_ARRAYLANG['TXT_NO_SEARCH_RESULTS'], $term) : $_ARRAYLANG['TXT_PLEASE_ENTER_SEARCHTERM'];
     $objTpl->setVariable('SEARCH_TITLE', $noresult);
     return $objTpl->get();
 }
Example #13
0
 /**
  * PHP 5 Constructor
  */
 function __construct()
 {
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/member/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->act = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';
     $this->setNavigation();
 }
 /**
  * Constructor
  */
 function __construct($tplPath, $name)
 {
     $this->_objTpl = new \Cx\Core\Html\Sigma($tplPath);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->moduleName = $name;
     $this->moduleNameLC = strtolower($this->moduleName);
     $this->_objTpl->setGlobalVariable(array('MODULE_NAME' => $this->moduleName, 'MODULE_NAME_LC' => $this->moduleNameLC, 'CSRF' => 'csrf=' . \Cx\Core\Csrf\Controller\Csrf::code()));
 }
 function __construct($pageContent)
 {
     parent::__construct();
     $this->getSettings();
     $this->_pageContent = $pageContent;
     $this->_objTemplate = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTemplate);
 }
Example #16
0
 /**
  * constructor
  *
  * global    \Cx\Core\Html\Sigma
  * global    array
  */
 function __construct()
 {
     parent::__construct();
     $this->_objTpl = new \Cx\Core\Html\Sigma($this->cx->getCodeBaseCoreModulePath() . '/Stats/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->firstDate = time();
 }
Example #17
0
 /**
  * Constructor
  *
  * @param  string
  * @access public
  */
 function __construct()
 {
     global $_ARRAYLANG, $objInit, $objTemplate;
     $this->pageTitle = $_ARRAYLANG["TXT_JOBS_MANAGER"];
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/Jobs/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->langId = $objInit->userFrontendLangId;
 }
Example #18
0
 /**
  * Constructor
  * @global integer
  */
 function __construct($pageContent)
 {
     global $_LANGID;
     $this->langId = $_LANGID;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_objTpl->setTemplate($pageContent);
 }
Example #19
0
 /**
  * Initializes the news module by loading the configuration options
  * and initializing the template object with $pageContent.
  * 
  * @param  string  News content page
  */
 public function __construct($pageContent)
 {
     parent::__construct();
     $this->getSettings();
     $this->_objTpl = new \Cx\Core\Html\Sigma();
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_objTpl->setTemplate($pageContent);
 }
 /**
  * Constructor php5
  */
 function __construct($pageContent)
 {
     global $_LANGID;
     $this->_pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_intLangId = $_LANGID;
     $this->_arrSettings = $this->createSettingsArray();
 }
 /**
  * Constructor PHP5
  */
 function __construct($pageContent)
 {
     $this->_pageContent = $pageContent;
     $this->_objTemplate = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTemplate);
     $this->rssPath = ASCMS_DIRECTORY_FEED_PATH . '/';
     $this->rssWebPath = ASCMS_DIRECTORY_FEED_WEB_PATH . '/';
     $this->settings = $this->getSettings();
 }
Example #22
0
 /**
  * PHP5 constructor
  * @global \Cx\Core\Html\Sigma
  * @see \Cx\Core\Html\Sigma::setErrorHandling, \Cx\Core\Html\Sigma::setVariable, initialize()
  */
 function __construct($administrate = false)
 {
     parent::__construct();
     $this->administrate = $administrate;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_initialize();
 }
 /**
  * Constructor php5
  */
 function __construct($pageContent)
 {
     global $_LANGID;
     $this->_pageContent = $pageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_langId = $_LANGID;
     parent::__construct();
 }
Example #24
0
 /**
  * Initialize forms and template
  * @param   string  $pageContent    The page content template
  * @return  Egov                    The Egov object
  */
 function __construct($pageContent)
 {
     $this->initContactForms();
     $this->pageContent = $pageContent;
     $this->objTemplate = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->objTemplate);
     $this->objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     $this->objTemplate->setTemplate($this->pageContent, true, true);
 }
 public function getBackendViewMessage()
 {
     $template = new \Cx\Core\Html\Sigma();
     $template->setErrorHandling(PEAR_ERROR_DIE);
     $template->loadTemplateFile($this->templateFile);
     $template->setVariable($this->templatePlaceholders);
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($template);
     return $template->get();
 }
Example #26
0
 /**
  * PHP5 Constructor
  *
  * @param string $pageContent page content from content manager
  */
 public function __construct($pageContent)
 {
     $this->objTemplate = new \Cx\Core\Html\Sigma(".");
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->objTemplate);
     $this->objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     $this->objTemplate->setTemplate($pageContent);
     $this->objUrl = \Env::get("Resolver")->getUrl();
     $this->uriParams = $this->objUrl->getParamArray();
 }
Example #27
0
 /**
  * Constructor   -> Create the module-menu and an internal template-object
  * @global   object      $objInit
  * @global   object      $objTemplate
  * @global   array       $_CORELANG
  */
 function __construct()
 {
     global $objInit, $objTemplate, $_ARRAYLANG, $_CORELANG;
     $this->_objTpl = new \Cx\Core\Html\Sigma(ASCMS_MODULE_PATH . '/U2u/View/Template/Backend');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->_intLanguageId = $objInit->userFrontendLangId;
     $objFWUser = \FWUser::getFWUserObject();
     $this->_intCurrentUserId = $objFWUser->objUser->getId();
 }
Example #28
0
 /**
  * Constructor
  * Initialize the template and transaction object.
  *
  * @access      public
  * @param       string     $pageContent      content page
  */
 public function __construct($pageContent)
 {
     global $objDatabase;
     parent::__construct();
     $this->objTransaction = new Transaction($objDatabase);
     $this->objTemplate = new \Cx\Core\Html\Sigma('.');
     $this->objTemplate->setErrorHandling(PEAR_ERROR_DIE);
     $this->objTemplate->setTemplate($pageContent);
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->objTemplate);
 }
Example #29
0
 /**
  * Constructor php5
  */
 function __construct($strPageContent)
 {
     global $_LANGID;
     parent::__construct();
     $this->_strPageContent = $strPageContent;
     $this->_objTpl = new \Cx\Core\Html\Sigma('.');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->_objTpl);
     $this->_intLanguageId = intval($_LANGID);
     $this->_arrSettings = $this->createSettingsArray();
 }
Example #30
0
 /**
  * Login to facebook and get the associated contrexx user.
  */
 public function login()
 {
     self::$facebook = new \Facebook(array('appId' => $this->applicationData[0], 'secret' => $this->applicationData[1]));
     $user = self::$facebook->getUser();
     if (empty($user) && empty($_GET["state"])) {
         \Cx\Core\Csrf\Controller\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));
         exit;
     }
     self::$userdata = $this->getUserData();
     $this->getContrexxUser($user);
 }