*/ class LSauthMethod_anonymous extends LSauthMethod { // Boolean flag to specify if this LSauthMethod support API mode protected static $api_mode_supported = true; public function __construct() { LSauth :: disableLoginForm(); LSauth :: disableSelfAccess(); parent :: __construct(); if ( (!defined('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT')) || (constant('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT') === True)) { self :: log_debug('logout : '.constant('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT')); LSauth :: disableLogoutBtn(); } if ( (!defined('LSAUTHMETHOD_ANONYMOUS_USER')) || (constant('LSAUTHMETHOD_ANONYMOUS_USER') == "")) { LSerror :: addErrorCode('LSauthMethod_anonymous_01'); return; } } /** * Check Auth Data * * Return authentication data or false * * @retval Array|false Array of authentication data or False **/ public function getAuthData() { $this -> authData = array( 'username' => LSAUTHMETHOD_ANONYMOUS_USER ); return $this -> authData; } } /* * Error Codes */ LSerror :: defineError('LSauthMethod_anonymous_01', ___("LSauthMethod_anonymous : You must define the LSAUTHMETHOD_ANONYMOUS_USER contant in the configuration file.") );