quick question: current_password required to edit username?
Posted: 20 June 2009 08:43 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  27
Joined  2008-05-06

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 usernameSo 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!

Profile
 
 
Posted: 22 June 2009 12:28 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8223
Joined  2006-10-18

UrbanTurf,

Like native EE settings, the current password is required to change ones username, screen name, email address, and password. smile

The Documenation has the seperate instance about the changing the password because it is referring directly to changing the password. wink

 Signature 
Profile