Esempio n. 1
0
 public function blockUnregister()
 {
     $my = CFactory::getUser();
     $config = CFactory::getConfig();
     if ($my->id == 0) {
         $config = CFactory::getConfig();
         $uri = CRoute::getURI(false);
         $uri = base64_encode($uri);
         $tmpl = new CTemplate();
         $fbHtml = '';
         if ($config->get('fbconnectkey') && $config->get('fbconnectsecret')) {
             CFactory::load('libraries', 'facebook');
             $facebook = new CFacebook(FACEBOOK_LOGIN_NOT_REQUIRED);
             $fbHtml = $facebook->getButtonHTML();
         }
         $tmpl->set('fbHtml', $fbHtml);
         $tmpl->set('return', $uri);
         $tmpl->set('config', $config);
         $html = $tmpl->fetch('guests.denied');
         echo $html;
         return true;
     }
     return false;
 }