Hi all,
I’m developing a simple form to allow users to change their username. My question:
Is current_password always required to allow the user to change his username?
The reason I ask is that even though I do not specify password_required=“y”, the form returns the error “The password you submitted was not correct” when I submit the form.
Here is my code:
{exp:user:edit form_id="edit_email" form_name="edit_email" secure_action="yes" secure_return="yes"}
<fieldset>
<legend>Change email address</legend>
Note that your account email address also serves as your username. So changing your email address will also change the username you use to login.
<ol>
<li><label for='username'>New email address (username):</label><input type='text' class='text' name='username' value='{username}' maxlength='125' /></li>
</ol>
</fieldset>
<fieldset class='submit'>
<input type="hidden" name="screen_name" />
<input type='submit' class='submit' value='Update Email Address' />
</fieldset>
{/exp:user:edit}
The docs say The ‘current_password’ form field is available and required in certain instances where the current password is required to update or change some fields such as password, username, etc. This would suggest that the password is required to change the username, no matter what. BUT, then just after that the docs say Note: When changing a password, the current password is a required field…, which would suggest that the password is required only to change to a new password.
Please clarify. Thanks!
