From c119f4e39c3643f9ebfdabfb88fec5a701c7db2d Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 13 Mar 2005 17:49:28 +0000 Subject: [PATCH] Bug 1617: Incorrect login message when using AuthPlugin --- includes/SpecialUserlogin.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 76db17bb81..1f9c1bcd03 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -295,10 +295,13 @@ class LoginForm { * automatically create a new account for users that * are externally defined but have not yet logged in. */ - if( $wgAuth->autoCreate() && - $wgAuth->userExists( $u->getName() ) && - $wgAuth->authenticate( $u->getName(), $this->mPassword ) ) { - $u =& $this->initUser( $u ); + if ( $wgAuth->autoCreate() && $wgAuth->userExists( $u->getName() ) ) { + if ( $wgAuth->authenticate( $u->getName(), $this->mPassword ) ) { + $u =& $this->initUser( $u ); + } else { + $this->mainLoginForm( wfMsg( 'wrongpassword' ) ); + return; + } } else { $this->mainLoginForm( wfMsg( 'nosuchuser', $u->getName() ) ); return; -- 2.20.1