Aashish's fix for bug33997 (SpecialPasswordReset does not always has the correct...
authorThomas Gries <wikinaut@users.mediawiki.org>
Sat, 11 Feb 2012 23:46:37 +0000 (23:46 +0000)
committerThomas Gries <wikinaut@users.mediawiki.org>
Sat, 11 Feb 2012 23:46:37 +0000 (23:46 +0000)
includes/specials/SpecialUserlogin.php

index cb3e879..b44700c 100644 (file)
@@ -133,9 +133,13 @@ class LoginForm extends SpecialPage {
                }
                $wgAuth->setDomain( $this->mDomain );
 
-               # When switching accounts, it sucks to get automatically logged out
+               # 1. When switching accounts, it sucks to get automatically logged out
+               # 2. Do not return to PasswordReset after a successful password change
+               #    but goto Wiki start page (Main_Page) instead ( bug 33997 )
                $returnToTitle = Title::newFromText( $this->mReturnTo );
-               if( is_object( $returnToTitle ) && $returnToTitle->isSpecial( 'Userlogout' ) ) {
+               if( is_object( $returnToTitle ) && (
+                       $returnToTitle->isSpecial( 'Userlogout' )
+                       || $returnToTitle->isSpecial( 'PasswordReset' ) ) ) {
                        $this->mReturnTo = '';
                        $this->mReturnToQuery = '';
                }