Extension:WSOAuth/Hooks/WSOAuthAfterGetUser
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 haverealname
andemail
. - $errorMessage: Error message displayed if the hook returns
false
.