Module

Archived
Forum
(read-only)

Stand-Alone Member Edit

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

Can’t change password

Support Request

neekster
neekster

Hopefully you can help me out with a problem that I just can’t resolve.

I’m using Member Edit to allow the member to change their password. But every time without fail the form submits no problem, with no errors but the password never changes.

One point to mention, I am using the Simple Registration module http://devot-ee.com/add-ons/simple-registration to allow users to register and login using email address not username. I’m sure that’s where my problem lies but I’m not 100% sure.

I included hidden fields for username and email thinking it may require one of them, and they are populating correctly, but no joy.

Here’s the code I have in my template:

{exp:sa_member_edit:form return="password-changed" id="change-password"}

<input type="hidden" name="username" value="{username}" />
<
input type="hidden" name="email" value="{email}" />


<
fieldset class="textfield password">
 <
label for="current_password" class="required">Current Password</label>
 <
input type="password" class="validate[required]" name="current_password" />
</
fieldset>

<
fieldset class="textfield password">
 <
label for="new_password" class="required">Password</label>
 <
input type="password" id="new_password" class="validate[required]" name="new_password" />
</
fieldset>

<
fieldset class="textfield password">
 <
label for="new_password_confirm" class="required">Confirm password</label>
 <
input type="password" id="new_password_confirm" class="validate[required,equals[new_password]" name="new_password_confirm" />
</
fieldset>



    <
fieldset class="form-actions">
     <
input type="submit" value="Change Password"  />
    </
fieldset>

{/exp:sa_member_edit:form} 

Thanks for your help!
Nick

Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

Hi Nick,

your field for current password should be named “password”, not “current_password”.
I know it’s complicated :)

neekster
# 2
neekster

Oh I already tried that, sorry I thought I mentioned that :)

I just tripple checked, and here’s the code I tested with

{exp:sa_member_edit:form return="change-password/password-changed" id="change-password"}

    
<input type="hidden" name="username" value="{username}" />
    <
input type="hidden" name="email" value="{email}" />
 


    <
fieldset class="textfield password">
     <
label for="password" class="required">Current Password</label>
     <
input type="password" class="validate[required]" name="password" />
    </
fieldset>

    <
fieldset class="textfield password">
     <
label for="new_password" class="required">Password</label>
     <
input type="password" id="new_password" class="validate[required]" name="new_password" />
    </
fieldset>

    <
fieldset class="textfield password">
     <
label for="new_password_confirm" class="required">Confirm password</label>
     <
input type="password" id="new_password_confirm" class="validate[required,equals[new_password]" name="new_password_confirm" />
    </
fieldset>



        <
fieldset class="form-actions">
         <
input type="submit" value="Change Password"  />
        </
fieldset>

    
{/exp:sa_member_edit:form} 

Using this code I get the error “The action you have requested is invalid.” when I submit the form.

Next couple days I’ll perhaps do a test with the same code with the simple registration module disabled in case they are clashing.

Thanks
Nick

Yuri Salimovskiy
# 3
Developer
Yuri Salimovskiy

Oh, sorry. Sometimes I get lost in this module myself :)

Your fields should be named: “current_password”, “password” and “password_confirm” (so without “new_” prefix)

neekster
# 4
neekster

Yey that got it! In hindsight I don’t know how I missed it, but yes, it’s an easy area to get lost in :)

Thanks so much for your help.

Nick