Merge "Revert "Add a hook to validate account creation fields.""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 10 Nov 2013 10:22:57 +0000 (10:22 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 10 Nov 2013 10:22:57 +0000 (10:22 +0000)
docs/hooks.txt
includes/specials/SpecialUserlogin.php
languages/messages/MessagesEn.php

index 700f765..7bd725a 100644 (file)
@@ -295,10 +295,6 @@ $article: Article object
 $user: the User object that was created. (Parameter added in 1.7)
 $byEmail: true when account was created "by email" (added in 1.12)
 
-'ValidateNewUser': Before user account is created, check account settings
-$user: the User object to be created.
-$&error: Error message, if any, returned by failed validation
-
 'AfterFinalPageOutput': At the end of OutputPage::output() but before final
 ob_end_flush() which will send the buffered output to the client. This allows
 for last-minute modification of the output within the buffer by using
index c8944d2..f40966c 100644 (file)
@@ -409,16 +409,6 @@ class LoginForm extends SpecialPage {
                        return Status::newFatal( 'userexists' );
                }
 
-               $validateError = '';
-               // Make sure that our extensions like the input for this user
-               if ( !wfRunHooks( 'ValidateNewUser', array( $u, &$validateError ) ) ) {
-                       wfDebug( "New user failed hook validation.\n" );
-                       if ( !$validateError ) {
-                           return Status::newFatal( 'newuserfailedvalidation' );
-                       }
-                       return Status::newFatal( $validateError );
-               }
-
                if ( $this->mCreateaccountMail ) {
                        # do not force a password for account creation by email
                        # set invalid password, it will be replaced later by a random generated password
index fd7ce57..2baccf5 100644 (file)
@@ -1169,7 +1169,6 @@ Use the form below to log in as another user.',
 'badretype'                       => 'The passwords you entered do not match.',
 'userexists'                      => 'Username entered already in use.
 Please choose a different name.',
-'newuserfailedvalidation'         => 'Your new account settings are invalid.',
 'loginerror'                      => 'Login error',
 'createacct-error'                => 'Account creation error',
 'createaccounterror'              => 'Could not create account: $1',