Manual:Hooks/AddNewAccount

From MediaWiki.org

Jump to: navigation, search
AddNewAccount
Available from version 1.5.0
Called after a user account is created

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

*Attach hook:
$wgHooks['AddNewAccount'][] = 'fnMyHook';
Called from: SpecialUserlogin.php

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


[edit] Details

  • $user: the User object that was created. (Parameter added in 1.7)
  • $byEmail: true when account was created "by email" (added in 1.12)