Extension:CentralAuth/CentralAuthPostLoginRedirect

Details
This is not merged yet. It is pending review at https://gerrit.wikimedia.org/r/73449.

The login and create account forms always supported a returnto and returntoquery parameters so that after login or creation the user might be returned to the initial page, or possibly some other page. The Create account / Login links on pages fill these in with the current page and its query string (if any), and custom links to the forms can specify something else.

In release 1.22, if extension CentralAuth is installed and $wgCentralAuthSilentLogin is true, then login and create account always redirect, there is no more "Welcome user" page at the end of successful form submission. This hook allows extensions to change the returnto to a particular welcome page or provide a query string parameter t Extensions which do override the returnTo should probably add the original to the returnToQuery parameter, so that they can display a "[Thanks, now take me back to wherever]" link.

If there is no returnto parameter to the login or create account form, and no extension changes the link, CentralAuth redirects to the default page of the wiki.


 * &$returnTo: page to which user will be redirected after success. The extension sets this to the returnto query string parameter to the login or create account form (if any); extensions can replace it with another page.
 * If not changed


 * &$returnToQuery: query string that will be appended to the page to which the user will be redirected after success. The extension sets this to the returnto query string parameter to the login or create account form (if any); extensions can replace it with another page.
 * $stickHTTPS specific to $wgSecureLogin (if the site wants SSL connection)
 * $type either "signup" or "login"