redoing r38040: two new hooks for email confirmation/invalidation, both are in User...
authorJack Phoenix <ashley@users.mediawiki.org>
Sun, 4 Oct 2009 16:26:43 +0000 (16:26 +0000)
committerJack Phoenix <ashley@users.mediawiki.org>
Sun, 4 Oct 2009 16:26:43 +0000 (16:26 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/User.php

index c8a71ef..159736d 100644 (file)
@@ -237,6 +237,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * New permission 'sendemail' added. Default right for all registered users. Can
   for example be used to prevent new accounts from sending spam.
 * (bug 16979) Tracking categories for __INDEX__ and __NOINDEX__
+* Two new hooks, ConfirmEmailComplete and InvalidateEmailComplete, which are
+  called after a user's email has been successfully confirmed or invalidated.
 
 === Bug fixes in 1.16 ===
 
index 6e7d816..ea24b0a 100644 (file)
@@ -564,6 +564,9 @@ $catpage: CategoryPage instance
 $unpatrolled:  Whether or not we are showing unpatrolled changes.
 $watched:      Whether or not the change is watched by the user.
 
+'ConfirmEmailComplete': Called after a user's email has been confirmed successfully
+&$user: user (object) whose email is being confirmed
+
 'ContribsPager::getQueryInfo': Before the contributions query is about to run
 &$pager: Pager object for contributions
 &queryInfo: The query for the contribs Pager
@@ -844,6 +847,9 @@ but after noinclude/includeonly/onlyinclude and other processing.
 &$text: string containing partially parsed text
 &$this->mStripState: Parser's internal StripState object
 
+'InvalidateEmailComplete': Called after a user's email has been invalidated successfully
+&$user: user (object) whose email is being invalidated
+
 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true)
 $article: article (object) being checked
 
index 2c4592f..cc74765 100644 (file)
@@ -2946,6 +2946,7 @@ class User {
         */
        function confirmEmail() {
                $this->setEmailAuthenticationTimestamp( wfTimestampNow() );
+               wfRunHooks( 'ConfirmEmailComplete', array( &$this ) );
                return true;
        }
 
@@ -2960,6 +2961,7 @@ class User {
                $this->mEmailToken = null;
                $this->mEmailTokenExpires = null;
                $this->setEmailAuthenticationTimestamp( null );
+               wfRunHooks( 'InvalidateEmailComplete', array( &$this ) );
                return true;
        }