LSauthMethod::anonymous : Added parameter LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT
authorBenjamin Renard <brenard@easter-eggs.com>
Tue, 16 Jul 2013 14:01:41 +0000 (16:01 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Tue, 16 Jul 2013 14:01:41 +0000 (16:01 +0200)
public_html/conf/LSauth/config.LSauthMethod_anonymous.php
public_html/includes/class/class.LSauthMethod_anonymous.php

index e8e8a5a..473726c 100644 (file)
@@ -29,4 +29,7 @@
 // User id used for anonymous connections
 define('LSAUTHMETHOD_ANONYMOUS_USER','ls');
 
+// Disable logout
+define('LSAUTHMETHOD_ANONYMOUS_DISABLE_LOGOUT',False);
+
 ?>
index 02343a4..e9d2c52 100644 (file)
@@ -29,12 +29,16 @@ class LSauthMethod_anonymous extends LSauthMethod {
 
   function LSauthMethod_anonymous() {
                LSauth :: disableLoginForm();
-               LSauth :: disableLogoutBtn();
                LSauth :: disableSelfAccess();
-               
+
                if (!parent :: LSauthMethod())
                        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') == "")) {
                        LSerror :: addErrorCode('LSauthMethod_anonymous_01');
                        return;