r57359 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57358‎ | r57359 | r57360 >
Date:16:26, 4 October 2009
Author:ashley
Status:resolved (Comments)
Tags:
Comment:
redoing r38040: two new hooks for email confirmation/invalidation, both are in User class now so they should work even if email is confirmed through password reset (etc.)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -564,6 +564,9 @@
565565 $unpatrolled: Whether or not we are showing unpatrolled changes.
566566 $watched: Whether or not the change is watched by the user.
567567
 568+'ConfirmEmailComplete': Called after a user's email has been confirmed successfully
 569+&$user: user (object) whose email is being confirmed
 570+
568571 'ContribsPager::getQueryInfo': Before the contributions query is about to run
569572 &$pager: Pager object for contributions
570573 &queryInfo: The query for the contribs Pager
@@ -844,6 +847,9 @@
845848 &$text: string containing partially parsed text
846849 &$this->mStripState: Parser's internal StripState object
847850
 851+'InvalidateEmailComplete': Called after a user's email has been invalidated successfully
 852+&$user: user (object) whose email is being invalidated
 853+
848854 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true)
849855 $article: article (object) being checked
850856
Index: trunk/phase3/includes/User.php
@@ -2946,6 +2946,7 @@
29472947 */
29482948 function confirmEmail() {
29492949 $this->setEmailAuthenticationTimestamp( wfTimestampNow() );
 2950+ wfRunHooks( 'ConfirmEmailComplete', array( &$this ) );
29502951 return true;
29512952 }
29522953
@@ -2960,6 +2961,7 @@
29612962 $this->mEmailToken = null;
29622963 $this->mEmailTokenExpires = null;
29632964 $this->setEmailAuthenticationTimestamp( null );
 2965+ wfRunHooks( 'InvalidateEmailComplete', array( &$this ) );
29642966 return true;
29652967 }
29662968
Index: trunk/phase3/RELEASE-NOTES
@@ -237,6 +237,8 @@
238238 * New permission 'sendemail' added. Default right for all registered users. Can
239239 for example be used to prevent new accounts from sending spam.
240240 * (bug 16979) Tracking categories for __INDEX__ and __NOINDEX__
 241+* Two new hooks, ConfirmEmailComplete and InvalidateEmailComplete, which are
 242+ called after a user's email has been successfully confirmed or invalidated.
241243
242244 === Bug fixes in 1.16 ===
243245

Follow-up revisions

RevisionCommit summaryAuthorDate
r57441Cleanup r57359 -- removing PHP4-isms (references not needed to pass objects u...brion22:14, 6 October 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38040new hook, ConfirmEmailCompleteashley18:11, 25 July 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   22:14, 6 October 2009

Cleaned up unnecessary the PHP4-style use of references in r57441

Status & tagging log