Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-18T16:03:57.820Z
Answers.Text: Isn't this missing a submit button?
Answers.UserDisplayName: James Greig
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-18T16:22:45.657Z
Answers.Text: And does this still work for Craft 3.5? Thanks!
Answers.UserDisplayName: James Greig
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2014-11-13T15:41:58.990Z
Answers.LastActivityDate: 2018-08-31T13:39:48.380Z
Answers.LastEditDate: 2018-08-31T13:39:48.380Z
Answers.UserDisplayName: Peter Tell
Body: <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>
  
Tags: <templating><form><password><frontend>
Title: Is it possible to change a user's password in the front-end?
ThreadText: # 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:
  
  ```html
  {% macro errorList(errors) %}
      {% if errors %}
          {% for error in errors %}
              <div class="error icon-cancel-circled">{{ error }}</div>
          {% endfor %}
      {% endif %}
  {% endmacro %}
  {% from _self import errorList %}
  
  <form method="post" action="" id="action-form" accept-charset="UTF-8" enctype="multipart/form-data">
      {{ getCsrfInput() }} {# Remove this if you aren't using CSRF #}
      <input type="hidden" name="action" value="users/saveUser"> {# "users/save-user" if you're on Craft 3 #}
      <input type="hidden" name="redirect" value="{{ entry.url }}">
      <input type="hidden" name="userId" value="{{ currentUser.id }}">
  
      <label for="currentPassword">Current Password</label>
      <input type="text" class="form-control" id="currentPassword" name="password" />
      {% if account is defined %}
          {{ errorList(account.getErrors('currentPassword')) }}
      {% endif %}
  
      <label for="email">Email</label>
      <input id="email" type="text" name="email" class="text" />
      {% if account is defined %}
          {{ errorList(account.getErrors('email')) }}
      {% endif %}
  
      <label for="newPassword">New Password</label>
      <input type="text" class="form-control" id="newPassword" name="newPassword" />
      {% if account is defined %}
          {{ errorList(account.getErrors('newPassword')) }}
      {% endif %}
  </form>
  
  ```
  
  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!  
  
  ---
  
  