Last modified: 2013-09-04 11:53:04 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 T40709, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38709 - $wgEmailConfirmToEdit = true influences behavior of $oTitle->userCan()
$wgEmailConfirmToEdit = true influences behavior of $oTitle->userCan()
Status: RESOLVED DUPLICATE of bug 26020
Product: MediaWiki
Classification: Unclassified
Page protection (Other open bugs)
1.17.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-26 13:15 UTC by Stephan Muggli
Modified: 2013-09-04 11:53 UTC (History)
1 user (show)

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


Attachments

Description Stephan Muggli 2012-07-26 13:15:38 UTC
I think I found a bug in the method userCan() of the Title object. We often use userCan( 'read' ) to ensure that the user is allowed to read the page or that some context is displayed like an extension. If $wgEmailConfirmToEdit is set to true, the behavior of userCan() isn't as expected. Every user, group doesn't matter, who doesn't have a confirmed E-Mail address fails in this check, because in the method checkUserBlock() the error 'confirmedittext' is added to the errors array. The documentation of this method says this check is done to 'Check that the user isn't blocked from editting', but this error is set on every action expect for 'createaccount'.
Comment 1 Alexandre Emsenhuber [IAlex] 2012-07-30 09:07:24 UTC
Until 1.18, Title::userCan() does not work correctly for 'read' permission, use Title::userCanRead() instead. This works correctly since 1.19.

*** This bug has been marked as a duplicate of bug 26020 ***
Comment 2 Stephan Muggli 2012-07-30 09:52:17 UTC
Thanks a lot for your response! I searched if this bug is already reported but i didn't found a right match. Ok so we will use Title::userCanRead().

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


Navigation
Links