LSauthMethod::anonymous : Added parameter LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT

This commit is contained in:
Benjamin Renard 2013-07-16 16:01:41 +02:00
parent fe57bf75b0
commit 7c6d3db03a
2 changed files with 10 additions and 3 deletions

View file

@ -29,4 +29,7 @@
// User id used for anonymous connections // User id used for anonymous connections
define('LSAUTHMETHOD_ANONYMOUS_USER','ls'); define('LSAUTHMETHOD_ANONYMOUS_USER','ls');
// Disable logout
define('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT',False);
?> ?>

View file

@ -29,12 +29,16 @@ class LSauthMethod_anonymous extends LSauthMethod {
function LSauthMethod_anonymous() { function LSauthMethod_anonymous() {
LSauth :: disableLoginForm(); LSauth :: disableLoginForm();
LSauth :: disableLogoutBtn();
LSauth :: disableSelfAccess(); LSauth :: disableSelfAccess();
if (!parent :: LSauthMethod()) if (!parent :: LSauthMethod())
return; return;
if ( (!defined('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT')) || (constant('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT') === True)) {
LSlog('logout : '.constant('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT'));
LSauth :: disableLogoutBtn();
}
if ( (!defined('LSAUTHMETHOD_ANONYMOUS_USER')) || (constant('LSAUTHMETHOD_ANONYMOUS_USER') == "")) { if ( (!defined('LSAUTHMETHOD_ANONYMOUS_USER')) || (constant('LSAUTHMETHOD_ANONYMOUS_USER') == "")) {
LSerror :: addErrorCode('LSauthMethod_anonymous_01'); LSerror :: addErrorCode('LSauthMethod_anonymous_01');
return; return;