From 545cea89f68b716e68ef8d6c2712c6b546c97abc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Wed, 17 Aug 2005 07:44:38 +0000 Subject: [PATCH] * Added a new hook, 'AddNewAccount', which is run after account creation --- docs/hooks.txt | 3 +++ includes/SpecialUserlogin.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/hooks.txt b/docs/hooks.txt index ddc7e2f00a..b285ddc11e 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -237,6 +237,9 @@ protocol came about after MediaWiki 1.4rc1. This is a list of known events and parameters; please add to it if you're going to add events to the MediaWiki code. +'AddNewAccount': after a user account is created +null: This hook passes null as an argument + 'ArticleDelete': before an article is deleted $article: the article (object) being deleted $user: the user (object) deleting the article diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 84b36ccdb1..0d2b80ae8b 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -147,6 +147,8 @@ class LoginForm { $wgUser->sendConfirmationMail(); } + wfRunHooks( 'AddNewAccount', null ); + if( $this->hasSessionCookie() ) { return $this->successfulLogin( wfMsg( 'welcomecreation', $wgUser->getName() ) ); } else { -- 2.20.1