Extension:CentralAuth/CentralAuthPostLoginRedirect

Details
The login and create account forms always supported returnto and returntoquery parameters so that after login or creation the user could be returned to their original 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 the CentralAuth extension is installed and  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 CentralAuth extension sets this to the returnto query string parameter that was passed to the login or create account form (if any); extensions can replace it with another page.


 * &$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 returntoquery query string parameter that was passed to the login or create account form (if any); extensions can replace or add to it.
 * $stickHTTPS specific to $wgSecureLogin (if the site wants SSL connection)
 * $type either "signup" or "login"

Extensions that add HTML to the "success" form page after login or account creation by hooking UserLoginComplete or BeforeWelcomeCreation will probably need to hook this to achieve similar results if CentralAuth is in use.