jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  jenkins-bot: Verified



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/189417
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I498c3f77018e73cbf5cb4ed2abe479f576797d81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: v0_2_0
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to