Fixed User::getGroups(), apparently broken since r33333. User::load() doesn't load...
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 22 Sep 2011 06:17:26 +0000 (06:17 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 22 Sep 2011 06:17:26 +0000 (06:17 +0000)
commit59623dc0d1575805cc56bba52e57d920c3aca136
tree74d318cfc86aa1999cf18333cb1b76dc1580d2d4
parent88bdda41b1d31b76543f813f6f2e98fd8b40749f
Fixed User::getGroups(), apparently broken since r33333. User::load() doesn't load groups anymore, so calling $this->getGroups() was the same as just accessing $this->mGroups. Usually it doesn't matter, since most factory functions are funnelled into loadFromId() which calls loadGroups() or loads the groups from the cache, but loadFromRow() was potentially broken.

It's necessary for User::loadFromRow() to set $this->mGroups to null, same as the calling code in User::loadFromDatabase(), so that they will be loaded dynamically when User::newFromRow() is called.

No bugs found that are caused by this but it couldn't hurt to have working accessors. Tested from eval.php.
includes/User.php