Ejemplo n.º 1
0
 /**
  * Log user out of the system
  *
  * NOTE: If the $completeLogout parameter is NOT specified, the application
  * will NOT log out ALL users. The application will use the next user ID in the stack
  * (unless the stack is empty).
  *
  * @param boolean $completeLogout Whether or not to logout all users in the stack
  * @return boolean Returns TRUE if user is loggout successfuly, FALSE otherwise
  */
 public static final function userLogout($compleLogout = false)
 {
     if (empty(self::$_userStack)) {
         return false;
     }
     if ($compleLogout) {
         self::$_userStack = array();
     } else {
         array_pop(self::$_userStack);
     }
     self::userFlushCache();
     return IEM::sessionSet('__IEM_SYSTEM_CurrentUser_Stack', self::$_userStack);
 }