MediaWiki master
MediaWiki\Hook\TempUserCreatedRedirectHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\Api\ApiHookRunner, and MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onTempUserCreatedRedirect (Session $session, UserIdentity $user, string $returnTo, string $returnToQuery, string $returnToAnchor, &$redirectUrl)
 This hook is called after an action causes a temporary user to be created or after the first successful edit for a temporary account.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "TempUserCreatedRedirect" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file TempUserCreatedRedirectHook.php.

Member Function Documentation

◆ onTempUserCreatedRedirect()

MediaWiki\Hook\TempUserCreatedRedirectHook::onTempUserCreatedRedirect ( Session $session,
UserIdentity $user,
string $returnTo,
string $returnToQuery,
string $returnToAnchor,
& $redirectUrl )

This hook is called after an action causes a temporary user to be created or after the first successful edit for a temporary account.

The handler may modify the redirect URL.

To differentiate between invocations of this hook where a) the account was created in the current request and b) the account existed, but made a first successful edit, one can examine the registration date of the account.

Since
1.39
Parameters
Session$session
UserIdentity$user
string$returnToThe prefixed DB key of the title to redirect to
string$returnToQueryAn extra query part
string$returnToAnchorEither an empty string or a fragment beginning with "#"
string&$redirectUrlThe URL to redirect to
Returns
bool|null

Implemented in MediaWiki\Api\ApiHookRunner, and MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: