https://bugzilla.wikimedia.org/show_bug.cgi?id=23222

           Summary: Should Special:UserLogout pass returnto parameters to
                    Special:UserLogin?
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: User login
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: nos...@vyznev.net


Created an attachment (id=7300)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=7300)
Patch to let Special:UserLogout pass returnto parameters to Special:UserLogin

After a user has logged out and logged back in, it would be nice if the "return
to" link on the login success page pointed to the page the user was on before
logging out (rather than to the Main Page).

Steps to reproduce:
* Go to any page on the wiki (other than the Main Page).
* Click the "log out" link from the personal toolbar.
* Observe the convenient "return to" link back to the page you came from at the
bottom of the page, but don't click it.  Instead, click the "log in again" link
shown earlier on the page.
* Log in.
* Observe that the "return to" link on the page you see now is much less
convenient, since it always points to the Main Page. 

This would actually seem quite easy to fix: Special:UserLogout just needs to
pass any "returnto" (and "returntoquery") parameters it receives to
Special:UserLogin.  This needs some technical fiddling with messages, since the
existing "log in again" link is just an ordinary wikilink in the logouttext
message, but it's not really very difficult.

In fact, I wrote the code to fix this (see attached patch) and tested it, but
hit upon a snag: if Special:UserLogin receives a "returnto" parameter (and if
no extensions like CentralAuth interfere) it will not show a success page at
all, but will just redirect directly to the given page.  This seems to be a
deliberate feature, and is probably useful if you're coming from a page that
told you to log in first, but in this case it seems quite unexpected and
probably undesirable.

So, instead of committing this, I'll just dump the diff here and ask what
others think.  Would this be a useful feature at all?  If so, exactly how
should it work?

-- 
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

Reply via email to