Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/189215
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/15/189215/1
diff --git a/GoogleLogin.php b/GoogleLogin.php
index bf46e26..657826e 100644
--- a/GoogleLogin.php
+++ b/GoogleLogin.php
@@ -136,6 +136,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 a804f50..1843127 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/189215
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: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits