From mediawiki.org
Available from version ??? (Gerrit change 73449)
Allows extensions to modify the redirect location after the user has finished logging in to their account.
Define function:
public static function onCentralAuthPostLoginRedirect( string &$returnTo, string &$returnToQuery, bool $stickHttps, string $type, string &$injectHtml ) { ... }
Attach hook:
$wgHooks['CentralAuthPostLoginRedirect'][] = 'MyExtensionHooks::onCentralAuthPostLoginRedirect';
Called from:File(s): CentralAuth / includes/specials/SpecialCentralLogin.php
Function(s): doLoginComplete

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:CentralAuthPostLoginRedirect extensions.


  • &$returnTo: A modifiable string representing the page name to redirect to
  • &$returnToQuery: A modifiable string representing the URL parameters to use for the returning query
  • $stickHttps: A bool representing whether or not to make the redirect link continue to use HTTPS
  • $type: A string representing the login redirect condition
  • &$injectHtml: A modifiable string representing the HTML to inject