<p>Change:</p>

<pre><code>{{ errorList(account.getErrors('password')) }} //Current password
</code></pre>

<p>To:</p>

<pre><code>{{ errorList(account.getErrors('currentPassword')) }} //Current password
</code></pre>

CC BY-SA 3.0
2014-11-03T22:01:49.217Z
2014-11-03T22:01:49.217Z
Brad Bell
<p>In the Setting of an account on front-end I've added the possibility to change the password. Please enter your current password, then the new</p>

<pre><code>&lt;form id="userform" class="" method="post" accept-charset="UTF-8"&gt;

    &lt;input type="hidden" name="action" value="users/saveUser"&gt;
    &lt;input type="hidden" name="redirect" value=""&gt;
    &lt;input type="hidden" name="userId" value="{{ user.id }}"&gt;

    {% macro errorList(errors) %}
        {% if errors %}
            &lt;div class="errors"&gt;

                {% for error in errors %}
                    &lt;div&gt;{{ error }}&lt;/div&gt;
                {% endfor %}
            &lt;/div&gt;
        {% endif %}
    {% endmacro %}

    &lt;input id="password" type="password" autocomplete="off" name="password" class="input-list password" value=""&gt;
    &lt;input id="newPassword" type="password" autocomplete="off" name="newPassword" class="input-list password" value=""&gt;

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

    &lt;input type="submit" value="Save" class="input-submit"&gt;
&lt;/form&gt;
</code></pre>

<p>Mistakes new password displayed and the error of the current password is not displayed, for example if it is wrong page just reboot and the data will not be saved. How to be</p>

<error-message><password>
Output error of the current password correctly
# Output error of the current password correctly

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

In the Setting of an account on front-end I've added the possibility to change the password. Please enter your current password, then the new


    
    
    

    {% macro errorList(errors) %}
        {% if errors %}
            

                {% for error in errors %}
                    {{ error }}
                {% endfor %}
            
        {% endif %}
    {% endmacro %}

    
    

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

    


Mistakes new password displayed and the error of the current password is not displayed, for example if it is wrong page just reboot and the data will not be saved. How to be

**Tags:** error-message, password


---

## 1 answers

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

Change:
{{ errorList(account.getErrors('password')) }} //Current password

To:
{{ errorList(account.getErrors('currentPassword')) }} //Current password


---

