<p>It is! To do so, they will have to be logged in and input their old password. They need the old password to change their email or update a password.</p>

<p>Here's an example:</p>

<pre class="lang-html prettyprint-override"><code>{% macro errorList(errors) %}
    {% if errors %}
        {% for error in errors %}
            &lt;div class="error icon-cancel-circled"&gt;{{ error }}&lt;/div&gt;
        {% endfor %}
    {% endif %}
{% endmacro %}
{% from _self import errorList %}

&lt;form method="post" action="" id="action-form" accept-charset="UTF-8" enctype="multipart/form-data"&gt;
    {{ getCsrfInput() }} {# Remove this if you aren't using CSRF #}
    &lt;input type="hidden" name="action" value="users/saveUser"&gt; {# "users/save-user" if you're on Craft 3 #}
    &lt;input type="hidden" name="redirect" value="{{ entry.url }}"&gt;
    &lt;input type="hidden" name="userId" value="{{ currentUser.id }}"&gt;

    &lt;label for="currentPassword"&gt;Current Password&lt;/label&gt;
    &lt;input type="text" class="form-control" id="currentPassword" name="password" /&gt;
    {% if account is defined %}
        {{ errorList(account.getErrors('currentPassword')) }}
    {% endif %}

    &lt;label for="email"&gt;Email&lt;/label&gt;
    &lt;input id="email" type="text" name="email" class="text" /&gt;
    {% if account is defined %}
        {{ errorList(account.getErrors('email')) }}
    {% endif %}

    &lt;label for="newPassword"&gt;New Password&lt;/label&gt;
    &lt;input type="text" class="form-control" id="newPassword" name="newPassword" /&gt;
    {% if account is defined %}
        {{ errorList(account.getErrors('newPassword')) }}
    {% endif %}
&lt;/form&gt;
</code></pre>

<p>This is code that would be inserted into a new custom front end template.</p>

CC BY-SA 4.0
2020-12-18T16:03:57.820Z
Isn't this missing a submit button?
James Greig
CC BY-SA 4.0
2020-12-18T16:22:45.657Z
And does this still work for Craft 3.5? Thanks!
James Greig
CC BY-SA 4.0
2014-11-13T15:41:58.990Z
2018-08-31T13:39:48.380Z
2018-08-31T13:39:48.380Z
Peter Tell
<p>Is it currently possible to change a user's password in for example the profile edit form? I'm currently using the forgot password approach for this.</p>

<templating><form><password><frontend>
Is it possible to change a user's password in the front-end?
# Is it possible to change a user's password in the front-end?

(Asked by: username_0 on 2014-11-13)

Is it currently possible to change a user's password in for example the profile edit form? I'm currently using the forgot password approach for this.

**Tags:** templating, form, password, frontend


---

## 1 answers

### Answer by username_1 on 2014-11-13. Score: 13 | Accepted answer

It is! To do so, they will have to be logged in and input their old password. They need the old password to change their email or update a password.
Here's an example:
{% macro errorList(errors) %}
    {% if errors %}
        {% for error in errors %}
            {{ error }}
        {% endfor %}
    {% endif %}
{% endmacro %}
{% from _self import errorList %}


    {{ getCsrfInput() }} {# Remove this if you aren't using CSRF #}
     {# "users/save-user" if you're on Craft 3 #}
    
    

    Current Password
    
    {% if account is defined %}
        {{ errorList(account.getErrors('currentPassword')) }}
    {% endif %}

    Email
    
    {% if account is defined %}
        {{ errorList(account.getErrors('email')) }}
    {% endif %}

    New Password
    
    {% if account is defined %}
        {{ errorList(account.getErrors('newPassword')) }}
    {% endif %}


This is code that would be inserted into a new custom front end template.

> **Comments:**
> **username_2**: Isn't this missing a submit button?  
> **username_2**: And does this still work for Craft 3.5? Thanks!  

---

