2

I am working on a member profile edit using Profile:edit and a safecracker form. There is just one small problem.

When I try to make changes to the profile (not as a super admin) it requires the current password. The documentation provides the following code, which I have tried, but I still get an error.

The code:

{exp:profile:edit return="/member-area/company-preview" form_class="profile"}

{if logged_in_group_id != 1}
  <p>(You must submit the current password to update this page)</p>
  <label><span>Your Current Password:</span>
   <input type="password" name="current_password" value="" />
  </label>
{/if}
<fieldset>
<label><span>Username:</span>
    <input type="text" name="username" value="{username}" />
        </label>

        <label><span>Screen Name:</span>
            <input type="text" name="screen_name" value="{screen_name}" />
        </label>

        <label><span>Email:</span>
            <input type="text" name="email" value="{email}" />
        </label>
</fieldset>

<fieldset>
    <p>Change password? Leave blank if you do not wish to change it.</p>
        <label><span>New Password</span>
            <input type="password" name="password" value="" />
        </label>

        <label><span>Confirm New Password</span>
            <input type="password" name="password_confirm" value="" />
        </label>

            {!-- superadmins don't have to submit existing password --}
            {if logged_in_group_id != 1}
                <p>(You must submit the current password to update this page)</p>
                <label><span>Your Current Password:</span>
                    <input type="password" name="current_password" value="" />
                </label>
            {/if}
</fieldset>

<fieldset>
    <label><span>*First Name:</span>
        {field:member_first_name}
    </label>

    <label><span>*Last Name:</span>
        {field:member_last_name}
    </label>

    <label><span>*Full Name:</span>
        {field:full_name}
    </label>

    <label><span>Address:</span>
        {field:member_address}
    </label>

    <label><span>Address:</span>
        {field:member_address2}
    </label>

    <label><span>City:</span>
        {field:member_city}
    </label>

    <label><span>State:</span>
        {field:member_state}
    </label>

    <label><span>Zip:</span>
        {field:member_zip}
    </label>

    <label><span>Main Phone:</span>
        {field:member_phone}
    </label>


    <fieldset>
        <input type="submit" value="Save" />
    </fieldset>
{/exp:profile:edit}

The error message:

In order to make changes you must submit the current password

I would appreciate any assistance resolving this.

Thanks.

  • Please post the complete code for the form you are using so we can see the outer tags as well. – Anna_MediaGirl Mar 13 '13 at 15:40
1

I resolved the problem. I updated the module from 1.0.7 to 1.0.9 and the problem went away.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.