Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/189418

Change subject: Add a config to force keep login
......................................................................

Add a config to force keep login

Mainly for replacement of MediaWiki login: Added a config to force the keep
login option to be enabled for longer login sessions.

Bug: T87675
Change-Id: I498c3f77018e73cbf5cb4ed2abe479f576797d81
---
M GoogleLogin.php
M includes/GoogleLogin.body.php
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleLogin 
refs/changes/18/189418/1

diff --git a/GoogleLogin.php b/GoogleLogin.php
index be9d296..0404cd2 100644
--- a/GoogleLogin.php
+++ b/GoogleLogin.php
@@ -133,6 +133,11 @@
        $wgGLShowKeepLogin = true;
 
        /**
+        * Control, if "Keep login" is always enabled (even if the user doesn't 
checked the keep login box!).
+        */
+       $wgGLForceKeepLogin = false;
+
+       /**
         * If the creation of wiki accounts is allowed with GoogleLogin or not, 
is handled by this
         * variable. Default is the value of 
$wgGroupPermissions['*']['createaccount'] (user right
         * to create a wiki account).
diff --git a/includes/GoogleLogin.body.php b/includes/GoogleLogin.body.php
index afcb6e0..e58f095 100644
--- a/includes/GoogleLogin.body.php
+++ b/includes/GoogleLogin.body.php
@@ -103,6 +103,9 @@
                 * @return boolean
                 */
                public function getKeepLogin() {
+                       if ( $this->getGLConfig()->get( 'GLForceKeepLogin' ) ) {
+                               return true;
+                       }
                        $request = $this->getRequest();
                        $status = $request->getSessionData( 
'wpGoogleLoginRemember' );
                        $request->setSessionData( 'wpGoogleLoginRemember', null 
);

-- 
To view, visit https://gerrit.wikimedia.org/r/189418
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I498c3f77018e73cbf5cb4ed2abe479f576797d81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: REL1_24
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to