Index: trunk/extensions/NewUserNotif/NewUserNotif.php |
— | — | @@ -40,12 +40,22 @@ |
41 | 41 | */ |
42 | 42 | function efNewUserNotifSetup() { |
43 | 43 | global $wgHooks, $wgMessageCache; |
44 | | - $wgHooks['AddNewAccount'][] = 'NewUserNotifier::hook'; |
| 44 | + $wgHooks['AddNewAccount'][] = 'efNewUserNotif'; |
45 | 45 | require_once( dirname( __FILE__ ) . '/NewUserNotif.i18n.php' ); |
46 | 46 | foreach( efNewUserNotifMessages() as $lang => $messages ) |
47 | 47 | $wgMessageCache->addMessages( $messages, $lang ); |
48 | 48 | } |
49 | 49 | |
| 50 | + /** |
| 51 | + * Hook account creation |
| 52 | + * |
| 53 | + * @param User $user User account that was created |
| 54 | + * @return bool |
| 55 | + */ |
| 56 | + function efNewUserNotif( $user ) { |
| 57 | + return NewUserNotifier::hook( $user ); |
| 58 | + } |
| 59 | + |
50 | 60 | } else { |
51 | 61 | echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); |
52 | 62 | exit( 1 ); |