r23478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23477‎ | r23478 | r23479 >
Date:14:32, 27 June 2007
Author:robchurch
Status:old
Tags:
Comment:
* Introduce 'UserEffectiveGroups' hook; see docs/hooks.txt for more information
* Add User::getRegistration() accessor
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
@@ -637,6 +637,10 @@
638638 $user: user that watched
639639 $article: article object that was watched
640640
 641+'UserEffectiveGroups': Called in User::getEffectiveGroups()
 642+$user: User to get groups for
 643+&$groups: Current effective groups
 644+
641645 'CategoryPageView': before viewing a categorypage in CategoryPage::view
642646 $catpage: CategoryPage instance
643647
Index: trunk/phase3/includes/User.php
@@ -1637,6 +1637,8 @@
16381638 $this->mEffectiveGroups[] = 'emailconfirmed';
16391639 }
16401640 }
 1641+ # Hook for additional groups
 1642+ wfRunHooks( 'UserEffectiveGroups', array( &$this, &$this->mEffectiveGroups ) );
16411643 }
16421644 }
16431645 return $this->mEffectiveGroups;
@@ -2467,6 +2469,18 @@
24682470 $this->mEmailToken &&
24692471 $this->mEmailTokenExpires > wfTimestamp();
24702472 }
 2473+
 2474+ /**
 2475+ * Get the timestamp of account creation, or false for
 2476+ * non-existent/anonymous user accounts
 2477+ *
 2478+ * @return mixed
 2479+ */
 2480+ public function getRegistration() {
 2481+ return $this->mId > 0
 2482+ ? $this->mRegistration
 2483+ : false;
 2484+ }
24712485
24722486 /**
24732487 * @param array $groups list of groups
Index: trunk/phase3/RELEASE-NOTES
@@ -109,6 +109,7 @@
110110 classes: mw-code, mw-css, mw-js)
111111 * (bug 6711) Add $wgAddGroups and $wgRemoveGroups to allow finer control over
112112 usergroup assignment.
 113+* Introduce 'UserEffectiveGroups' hook; see docs/hooks.txt for more information
113114
114115 == Bugfixes since 1.10 ==
115116

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log