ZEND_AUTH Check if user logged-in

This example show you how we can check if a use logged in

 $auth = Zend_Auth::getInstance();
 if (!$auth->hasIdentity()) {
     if ('login' != $this->getRequest()->getActionName()) {
         $this->_helper->getHelper('Redirector')->setGotoRoute(array(), 'MYROUTE');
     }
 }

Date: 15/01/2012

Par: admin

0 comment

More info

How to access to private property in php5

This is a code show how to access to private property in php

  <?php
      class MyClass {
          private $privateProperty = 'myproperty';
      }

      $reflectionClass = new ReflectionClass('MyClass');

      $reflectionProperty = $reflectionClass->getProperty('privateProperty');
    ...

Date: 23/12/2011

Par: admin

0 comment

More info