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

Change subject: Allow a wiki sysadmin to turn off the e-mail verification
......................................................................


Allow a wiki sysadmin to turn off the e-mail verification

For accounts created with GoogleLogin.

Bug: T108001
Change-Id: I87733c3b67b21d4de542f1426b447602cee28e0a
---
M GoogleLogin.php
M includes/specials/SpecialGoogleLogin.php
2 files changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/GoogleLogin.php b/GoogleLogin.php
index 8a4e660..929d945 100644
--- a/GoogleLogin.php
+++ b/GoogleLogin.php
@@ -200,3 +200,9 @@
  * the right side of the login form, instead above the normal login form.
  */
 $wgGLShowRight = false;
+
+/**
+ * Whether the user needs to confirm the google mail adress after registration
+ * of a new local MediaWiki account, or not.
+ */
+$wgGLNeedsConfirmEmail = true;
diff --git a/includes/specials/SpecialGoogleLogin.php 
b/includes/specials/SpecialGoogleLogin.php
index 1a6e3e5..addede8 100644
--- a/includes/specials/SpecialGoogleLogin.php
+++ b/includes/specials/SpecialGoogleLogin.php
@@ -448,7 +448,12 @@
                                                        if ( !$user ) {
                                                                
$this->createError( $this->msg( 'googlelogin-link-other' )->text() );
                                                        } else {
-                                                               
$user->sendConfirmationMail();
+                                                               if ( 
$glConfig->get( 'GLNeedsConfirmEmail' ) ) {
+                                                                       
$user->sendConfirmationMail();
+                                                               } else {
+                                                                       
$user->confirmEmail();
+                                                                       
$user->saveSettings();
+                                                               }
                                                                
$user->setCookies();
                                                                // create a log 
entry for the created user - bug 67245
                                                                if ( 
$glConfig->get( 'GLShowCreateReason' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87733c3b67b21d4de542f1426b447602cee28e0a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleLogin
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to