Last modified: 2010-05-15 15:48:29 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11576, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9576 - User::isAllowed() doesn't work as expected in the first call
User::isAllowed() doesn't work as expected in the first call
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
User login and signup (Other open bugs)
1.9.x
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-13 23:44 UTC by Aldinei
Modified: 2010-05-15 15:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aldinei 2007-04-13 23:44:05 UTC
In the first call of isAllowed(), the user object is loaded with the 
loadDefaults() method, but the mGroups field remains empty.

The problem is in the code below. The mGroups field is loaded by the setToken() method but afterwards it 
is cleared.

		$this->setToken(); # Random
		$this->mEmailAuthenticated = null;
		$this->mEmailToken = '';
		$this->mEmailTokenExpires = null;
		$this->mRegistration = wfTimestamp( TS_MW );
		$this->mGroups = array();
Comment 1 Brion Vibber 2007-04-24 16:00:55 UTC
First call of what?

Nothing should be getting set by that setToken() call except for $this->mToken;
$this->mDataLoaded will have already been set before the call to loadDefaults(),
so the $this->load() call in setToken() won't change anything.

Can you give an example of how the described behavior is triggered?
Comment 2 Aldinei 2007-04-24 19:07:15 UTC
I could not reproduce again with the original User.php. An extension I have 
used (canAccessNamespace() extension) should have caused the problem.

I am invalidating the bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links