Jump to content

Extension:WSOAuth/Hooks/WSOAuthAfterGetUser

From mediawiki.org
WSOAuthAfterGetUser
Available from version 2.1
called after user info is retrieved from the external OAuth provider; stops the authentication flow if false is returned
Define function:
public static function onWSOAuthAfterGetUser( &$user_info, &$errorMessage ) { ... }
Attach hook:
$wgHooks['WSOAuthAfterGetUser'][] = 'MyExtensionHooks::onWSOAuthAfterGetUser';
Called from:File(s): WSOAuth / src/WSOAuth.php
Function(s): authenticate

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

Details

[edit]
  • $user_info: The array containing the user's information; false if the authentication failed or the user is not authorised. The array must have at least the key name and might have realname and email.
  • $errorMessage: Error message displayed if the hook returns false.