protected function GetCurrentUser()
	{
		if (!$this->_cu)
		{
			require_once("verysimple/Authentication/Authenticator.php");
			
			$this->Phreezer->Observe("Loading CurrentUser from Session");
			$this->_cu = Authenticator::GetCurrentUser($this->GUID);

			if ($this->_cu )
			{
				if (get_class($this->_cu) == "__PHP_Incomplete_Class")
				{
					// this happens if the class used for authentication was not included before the session was started
					$tmp = print_r($this->_cu,1);
					$parts1 = explode("__PHP_Incomplete_Class_Name] => ",$tmp);
					$parts2 = explode("[",$parts1[1]);
					$name = trim($parts2[0]);

					Authenticator::ClearAuthentication($this->GUID);
					throw new Exception("The class definition used for authentication '$name' must be defined (included) before the session is started, for example in _app_config.php.");
				}
				else
				{
					// refresh the current user if the object supports it
					if (method_exists($this->_cu, 'Refresh')) $this->_cu->Refresh($this->Phreezer);
				}
			}
		}
		else
		{
			$this->Phreezer->Observe("Using previously loaded CurrentUser");
		}

		return $this->_cu;
	}
protected function GetCurrentUser()
	{
		if (!$this->_cu)
		{
			require_once("verysimple/Authentication/Authenticator.php");
			
			$this->Phreezer->Observe("Loading CurrentUser from Session");
			$this->_cu = Authenticator::GetCurrentUser($this->GUID);

			if ($this->_cu )
			{
				if (get_class($this->_cu) == "__PHP_Incomplete_Class")
				{
					// this happens if the class used for authentication was not included before the session was started
					$tmp = print_r($this->_cu,1);
					$parts1 = explode("__PHP_Incomplete_Class_Name] => ",$tmp);
					$parts2 = explode("[",$parts1[1]);
					$name = trim($parts2[0]);

					Authenticator::ClearAuthentication($this->GUID);
					throw new Exception("The class definition used for authentication '$name' must be defined (included) before the session is started, for example in _app_config.php.");
				}
				else
				{
					// refresh the current user if the object supports it
					if (method_exists($this->_cu, 'Refresh')) $this->_cu->Refresh($this->Phreezer);
				}
			}
		}
		else
		{
			$this->Phreezer->Observe("Using previously loaded CurrentUser");
		}

		return $this->_cu;
	}
protected function GetCurrentUser ( ) { if ( ! $ this -> _cu ) { require_once ( "verysimple/Authentication/Authenticator.php" ) ; $ this -> Phreezer -> Observe ( "Loading CurrentUser from Session" ) ; $ this -> _cu = Authenticator :: GetCurrentUser ( $ this -> GUID ) ; if ( $ this -> _cu ) { if ( get_class ( $ this -> _cu ) == "__PHP_Incomplete_Class" ) { // this happens if the class used for authentication was not included before the session was started
 $ tmp = print_r ( $ this -> _cu , 1 ) ; $ parts1 = explode ( "__PHP_Incomplete_Class_Name] => " , $ tmp ) ; $ parts2 = explode ( "[" , $ parts1 [ 1 ] ) ; $ name = trim ( $ parts2 [ 0 ] ) ; Authenticator :: ClearAuthentication ( $ this -> GUID ) ; throw new Exception ( "The class definition used for authentication '$name' must be defined (included) before the session is started, for example in _app_config.php." ) ; } else { // refresh the current user if the object supports it
 if ( method_exists ( $ this -> _cu , 'Refresh' ) ) $ this -> _cu -> Refresh ( $ this -> Phreezer ) ; } } } else { $ this -> Phreezer -> Observe ( "Using previously loaded CurrentUser" ) ; } return $ this -> _cu ; }
Returns the currently authenticated user, or null if a user has not been authenticated.

@return IAuthenticatable || null
Returns the currently authenticated user or null if a user has not been authenticated .