https://bugzilla.wikimedia.org/show_bug.cgi?id=33997
--- Comment #3 from Aashish Mittal <ashishmittal.m...@gmail.com> 2012-02-11 19:23:56 UTC --- Created attachment 9988 --> https://bugzilla.wikimedia.org/attachment.cgi?id=9988 changes to SpecialUserLogin to return to Main_Page after a password change Hello, Thanks for the detailed explanation. I reproduced the second scenario and was able to figure out the following solutions for it: 1. Modification of SpecialUserLogin to check if the returntitle is PasswordReset. If yes, make the returnto empty. The code snippet is: # Do not redirect back to PasswordReset (instead to the Main_Page) after a successful password change if( is_object( $returnToTitle ) && $returnToTitle->isSpecial( 'PasswordReset' ) ) { $this->mReturnTo = ''; $this->mReturnToQuery = ''; } In this case, the returnto is still set to PasswordReset in the url, but after Login submission, the returnto is made emptied. Similar solution exits for the UserLogout page. In the case of UserLogout, if I manually go to UserLogout and click on Login, the returnto is set to UserLogout. Hence after successful login, the user would be returned to Logout page, but similar code prevents it from going to Logout page. 2. Second solution is to modify the SkinTemplate to modify the login url itself. In the SkinTemplate, I can check the $wgRequest->getVal('returnto') and if it is set to PasswordReset, I can modify it to Main_Page. This would change the returnto in the $loginurl itself and would be used to return the user back to main page once the user has logged in. I am attaching a patch for the former, kindly give your review which solution is more suitable and if the code and the output seems fine. Thanks in advance. Regards, Aashish -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l