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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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