0

I am using Solspace User.

Unable to force user to input current password after modifying their profile.

Using this parameter password_required="y" or password_required="yes" takes no effect. It is not redirecting me to error page or prompting any error message

I am not logged in as Super Admin

{exp:user:edit
    group_id="5|6"
    member_id="{segment_3}"
    password_required="yes"
    required="formal_title|first_name|last_name"
    return="teachers/edit_profile/{segment_3}/success"
            error_page="teachers/error"
}

    <input type="text" name="username" value="{username}" placeholder="Email address"/>
    <br>

    <select name="formal_title">
        {select_formal_title}
            <option value="{value}" {selected}>{value}</option>
        {/select_formal_title}
    </select>
    <br>

    <input type="text" name="first_name" value="{first_name}" placeholder="First name"/>
    <br>

    <input type="text" name="last_name" value="{last_name}" placeholder="Last name"/>
    <br>



    <input type="password" name="current_password" placeholder="Current Password" />
    <br>

    <input type="submit" value="Submit" />

{/exp:user:edit}

Any ideas? Appreciate for help

Thanks

1

From the Solspace documentation about the current_password form field:

This form field is available and required in certain instances where the current password is required to update or change certain profile data:

  • password & password_confirm fields are modified (unless the submitter is a Super Admin or in one of the authorized member groups specified in the group_id parameter).
  • email field is modified.
  • username field is modified.
  • screen_name field is modified, unless screen_name_password_required parameter is specified with value of no.
  • password_required parameter is specified with value of yes.

Note that current_password isn't affected by editing a custom member field.

Also, current_password also isn't necessary if you're logged in as a member whose member group has administrative powers, which is controlled by the group_id="" parameter. If you remove your group_id from the group_id="" parameter in your code above, current_password becomes required if you modify any of the above fields mentioned in the documentation.

| improve this answer | |
  • Removed group_id="" solved it. Thanks – Dimitri Kouvdis Jan 27 '14 at 19:59

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.