/**
  * Parse
  */
 private function parse()
 {
     $this->tpl->assign('isLoggedIn', FrontendProfilesAuthentication::isLoggedIn());
     if (FrontendProfilesAuthentication::isLoggedIn()) {
         // get the profile
         /**
          * @var FrontendProfilesProfile
          */
         $profile = FrontendProfilesAuthentication::getProfile();
         $this->tpl->assign('profile', $profile->toArray());
     }
 }
Beispiel #2
0
 /**
  * Parse the general profiles info into the template.
  */
 public static function parse()
 {
     // get the template
     $tpl = Spoon::get('template');
     // logged in
     if (FrontendProfilesAuthentication::isLoggedIn()) {
         // get profile
         $profile = FrontendProfilesAuthentication::getProfile();
         // display name set?
         if ($profile->getDisplayName() != '') {
             $tpl->assign('profileDisplayName', $profile->getDisplayName());
         } else {
             $tpl->assign('profileDisplayName', $profile->getEmail());
         }
         // show logged in
         $tpl->assign('isLoggedIn', true);
     }
     // ignore these url's in the querystring
     $ignoreUrls = array(FrontendNavigation::getURLForBlock('profiles', 'login'), FrontendNavigation::getURLForBlock('profiles', 'register'), FrontendNavigation::getURLForBlock('profiles', 'forgot_password'));
     // querystring
     $queryString = isset($_GET['queryString']) ? SITE_URL . '/' . urldecode($_GET['queryString']) : SELF;
     // check all ignore urls
     foreach ($ignoreUrls as $url) {
         // querystring contains a boeboe url
         if (stripos($queryString, $url) !== false) {
             $queryString = '';
             break;
         }
     }
     // no need to add this if its empty
     $queryString = $queryString != '' ? '?queryString=' . urlencode($queryString) : '';
     // useful urls
     $tpl->assign('loginUrl', FrontendNavigation::getURLForBlock('profiles', 'login') . $queryString);
     $tpl->assign('registerUrl', FrontendNavigation::getURLForBlock('profiles', 'register'));
     $tpl->assign('forgotPasswordUrl', FrontendNavigation::getURLForBlock('profiles', 'forgot_password'));
 }
 /**
  * Get profile data.
  *
  * @return	void
  */
 private function getData()
 {
     // get profile
     $this->profile = FrontendProfilesAuthentication::getProfile();
 }