Manual:Hooks/EmailConfirmed

From MediaWiki.org
Jump to: navigation, search
EmailConfirmed
Available from version 1.7.0
Replace default way to check whether user's email is confirmed

*Define function:
function fnMyHook( $user, &$confirmed ) { ... }

*Attach hook:
$wgHooks['EmailConfirmed'][] = 'MyExtensionHooks::someExample';
Called from: User.php

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


[edit] Details

When checking that the user's email address is "confirmed" using an alternative method:

  • $user: User information
  • $confirmed: To be set by the hooked function. true for confirmed, false otherwise.

This runs before the other checks, such as anonymity and the real check; return true to allow those checks to occur, and false if checking is done.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox