Beispiel #1
0
 /**
  * check user can view the active element
  * If user logged in return false
  * @return bol can view or not
  */
 function canUse()
 {
     $user = JFactory::getUser();
     $params = $this->getParams();
     if ($user->id != 0) {
         if ($params->get('captcha-showloggedin', 0) == 0) {
             return false;
         }
     }
     return parent::canUse();
 }
Beispiel #2
0
 /**
  * (non-PHPdoc)
  * @see plgFabrik_Element::canUse()
  */
 public function canUse(&$model = null, $location = null, $event = null)
 {
     $user = JFactory::getUser();
     $params = $this->getParams();
     if ($user->id != 0) {
         if ($params->get('captcha-showloggedin', 0) == 0) {
             return false;
         }
     }
     return parent::canUse();
 }