Example #1
0
 function authenticate()
 {
     if (empty($_SESSION['__CurrentUser'])) {
         if ($this->CurrentUser =& $this->_authenticateOrRequestWithHttpBasic($this->t('Application Administration'), new User())) {
             $_SESSION['__CurrentUser'] = serialize($this->CurrentUser);
         }
     } else {
         $this->CurrentUser = unserialize($_SESSION['__CurrentUser']);
     }
     if ($result = !empty($_SESSION['__CurrentUser'])) {
         User::_setCurrentUser($this->CurrentUser);
     }
     return $result;
 }
Example #2
0
 function getCurrentUser()
 {
     return User::_setCurrentUser(false);
 }