Merge "Convert article delete to use OOUI"
[lhc/web/wiklou.git] / includes / auth / TemporaryPasswordPrimaryAuthenticationProvider.php
index 2e6f93c..4a2d009 100644 (file)
@@ -246,7 +246,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
                        $sv->merge( $this->checkPasswordValidity( $username, $req->password ) );
 
                        if ( $req->mailpassword ) {
-                               if ( !$this->emailEnabled && !$req->hasBackchannel ) {
+                               if ( !$this->emailEnabled ) {
                                        return \StatusValue::newFatal( 'passwordreset-emaildisabled' );
                                }
 
@@ -336,7 +336,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                $ret = \StatusValue::newGood();
                if ( $req ) {
-                       if ( $req->mailpassword && !$req->hasBackchannel ) {
+                       if ( $req->mailpassword ) {
                                if ( !$this->emailEnabled ) {
                                        $ret->merge( \StatusValue::newFatal( 'emaildisabled' ) );
                                } elseif ( !$user->getEmail() ) {
@@ -360,7 +360,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
                        if ( $req->username !== null && $req->password !== null ) {
                                // Nothing we can do yet, because the user isn't in the DB yet
                                if ( $req->username !== $user->getName() ) {
-                                       $req = clone( $req );
+                                       $req = clone $req;
                                        $req->username = $user->getName();
                                }