Page MenuHomePhabricator

ChangeEmail should show password-required message only if $wgRequirePasswordforEmailChange is true
Closed, ResolvedPublic

Description

"changeemail-text" message (shown on top of Special:ChangeEmail) says "You will need to enter your password to confirm this change."

This message should only be shown if $wgRequirePasswordforEmailChange is true. Currently, it's always shown unconditionally. $wgRequirePasswordforEmailChange is set to true by default so this is not that high priority.

Event Timeline

Glaisher raised the priority of this task from to Medium.
Glaisher updated the task description. (Show Details)
Glaisher subscribed.

This task is kind of straight forward to me and has caught my interested. I will like to work on it. Is it still open?

Yes, the status is shown in the left upper corner and that says "Open". :)

Krenair subscribed.

Doesn't look as easy as it sounds. This is added by FormSpecialPage::getForm which leaves no control of it to the subclass.

Actually, maybe it's still easy enough to be considered good first task

Change 243643 had a related patch set uploaded (by D3r1ck01):
ChangeEmail should show password-required message

https://gerrit.wikimedia.org/r/243643

Doesn't look as easy as it sounds. This is added by FormSpecialPage::getForm which leaves no control of it to the subclass.

Child classes of FormSpecialPage can use alterForm() to modify the HTMLForm but in this case the message key is hardcoded to use the messagePrefix and '-text'. So we can remove the current message 'changeemail-text' and add our own header message which is always shown. Then another message which is shown when the wg variable is true. The messages can be added by using addHeaderText() of HTMLForm.

Thanks and i will work on it.

Change 243643 abandoned by D3r1ck01:
ChangeEmail should show password-required message

Reason:
will submit another.

https://gerrit.wikimedia.org/r/243643

Change 243676 had a related patch set uploaded (by D3r1ck01):
ChangeEmail should show password-required message

https://gerrit.wikimedia.org/r/243676

Change 243676 abandoned by D3r1ck01:
ChangeEmail should show password-required message

Reason:
will submit a brand new patch

https://gerrit.wikimedia.org/r/243676

Change 243681 had a related patch set uploaded (by D3r1ck01):
ChangeEmail should show password-required message

https://gerrit.wikimedia.org/r/243681

Change 243681 merged by jenkins-bot:
Show password-required message only if $wgRequirePasswordforEmailChange = true

https://gerrit.wikimedia.org/r/243681