Answers.Body: <p>Thanks to billythekid's suggestion, adding a password field creates an elevated session, and solves my problem.</p>
  
  <pre><code>&lt;input type="password" name="password" placeholder="Password" required&gt;
  </code></pre>
  
  <p>Actually I don't think it's that intrusive, and it's a good security step that should generally be encouraged when making any profile edits.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-01T14:21:30.287Z
Answers.LastActivityDate: 2017-03-01T14:21:30.287Z
Answers.UserDisplayName: Ian Ebden
Body: <p>Some similar posts on here already but I'm still struggling. My code looks fine as far as I can tell? Page just reloads with no changes to the email (other fields change fine). I'm missing something right?</p>
  
  <pre><code>&lt;form method="post" accept-charset="UTF-8" enctype="multipart/form-data" class="js-validate"&gt;
  {{ getCsrfInput() }}
  &lt;input type="hidden" name="action" value="users/saveUser"&gt;
  &lt;input type="hidden" name="redirect" value="{{ craft.request.url ~ '/saved' }}"&gt;
  &lt;input type="hidden" name="userId" value="{{ currentUser.id }}"&gt;
  &lt;input type="hidden" name="password" value="{{ currentUser.password }}"&gt;
  
  &lt;h1&gt;{{ "My Profile"|translate }}&lt;/h1&gt;
  &lt;ol&gt;
      &lt;li&gt;
          &lt;label for="firstName" class="hidden"&gt;{{ "First Name"|translate }}&lt;sup&gt;*&lt;/sup&gt;&lt;/label&gt;
          &lt;input type="text" name="firstName" id="firstName" placeholder="{{ "First Name"|translate }}" value="{{ currentUser.firstName }}" required&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;label for="lastName" class="hidden"&gt;{{ "Last Name"|translate }}&lt;sup&gt;*&lt;/sup&gt;&lt;/label&gt;
          &lt;input type="text" name="lastName" id="lastName" placeholder="{{ "Last Name"|translate }}" value="{{ currentUser.lastName }}" required&gt;
      &lt;/li&gt;
      &lt;li&gt;
          {% if currentUser.unverifiedEmail %}
              &lt;div class="well"&gt;
                  &lt;h5&gt;{{ "Email verification pending"|translate }}&lt;/h5&gt;
                  &lt;p&gt;{{ "We sent a verification email to"|translate }} &lt;a href="{{ currentUser.unverifiedEmail }}"&gt;{{ currentUser.unverifiedEmail }}&lt;/a&gt;. {{ "Until this email is verified, we’ll continue to use your previous email"|translate }} (&lt;a href="{{ currentUser.email }}"&gt;{{ currentUser.email }}&lt;/a&gt;).&lt;/p&gt;
              &lt;/div&gt;
          {% else %}
              &lt;label for="email" class="hidden"&gt;Email&lt;sup&gt;*&lt;/sup&gt;&lt;/label&gt;
              &lt;input type="email" name="email" id="email" placeholder="{{ "Email"|translate }}" value="{{ currentUser.email }}" required&gt;
          {% endif %}
      &lt;/li&gt;
      &lt;li&gt;
          &lt;label for="userTownCity" class="hidden"&gt;{{ "Town/City"|translate }}&lt;/label&gt;
          &lt;input type="text" name="fields[userTownCity]" id="userTownCity" placeholder="{{ "Town/City"|translate }}" value="{{ currentUser.userTownCity }}"&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;label for="userPhoneNumber" class="hidden"&gt;{{ "Phone Number"|translate }}&lt;/label&gt;
          &lt;input type="text" name="fields[userPhoneNumber]" id="userPhoneNumber" placeholder="{{ "Phone Number"|translate }}" value="{{ currentUser.userPhoneNumber }}"&gt;
      &lt;/li&gt;
  &lt;/ol&gt;
  &lt;input type="submit" value="Save Changes" class="button button--fw"&gt;
  </code></pre>
  
  <p></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-01T13:35:00.140Z
Comments.Text: Could this be because changing email address requires an [elevated session](https://craftcms.com/news/new-security-features)?
Comments.UserDisplayName: billythekid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-01T13:54:33.450Z
Comments.Text: Oh okay, thanks. That's new information for me. So I guess I need to prompt user to (re)enter their password when changing email address. I'll give it a shot.
Comments.UserDisplayName: Ian Ebden
Tags: <users><user-profile><current-user>
Title: Change email address on front end
ThreadText: # Change email address on front end
  
  (Asked by: username_0 on 2017-03-01)
  
  Some similar posts on here already but I'm still struggling. My code looks fine as far as I can tell? Page just reloads with no changes to the email (other fields change fine). I'm missing something right?
  
  ```
  <form method="post" accept-charset="UTF-8" enctype="multipart/form-data" class="js-validate">
  {{ getCsrfInput() }}
  <input type="hidden" name="action" value="users/saveUser">
  <input type="hidden" name="redirect" value="{{ craft.request.url ~ '/saved' }}">
  <input type="hidden" name="userId" value="{{ currentUser.id }}">
  <input type="hidden" name="password" value="{{ currentUser.password }}">
  
  <h1>{{ "My Profile"|translate }}</h1>
  <ol>
      <li>
          <label for="firstName" class="hidden">{{ "First Name"|translate }}<sup>*</sup></label>
          <input type="text" name="firstName" id="firstName" placeholder="{{ "First Name"|translate }}" value="{{ currentUser.firstName }}" required>
      </li>
      <li>
          <label for="lastName" class="hidden">{{ "Last Name"|translate }}<sup>*</sup></label>
          <input type="text" name="lastName" id="lastName" placeholder="{{ "Last Name"|translate }}" value="{{ currentUser.lastName }}" required>
      </li>
      <li>
          {% if currentUser.unverifiedEmail %}
              <div class="well">
                  <h5>{{ "Email verification pending"|translate }}</h5>
                  <p>{{ "We sent a verification email to"|translate }} <a href="{{ currentUser.unverifiedEmail }}">{{ currentUser.unverifiedEmail }}</a>. {{ "Until this email is verified, we’ll continue to use your previous email"|translate }} (<a href="{{ currentUser.email }}">{{ currentUser.email }}</a>).</p>
              </div>
          {% else %}
              <label for="email" class="hidden">Email<sup>*</sup></label>
              <input type="email" name="email" id="email" placeholder="{{ "Email"|translate }}" value="{{ currentUser.email }}" required>
          {% endif %}
      </li>
      <li>
          <label for="userTownCity" class="hidden">{{ "Town/City"|translate }}</label>
          <input type="text" name="fields[userTownCity]" id="userTownCity" placeholder="{{ "Town/City"|translate }}" value="{{ currentUser.userTownCity }}">
      </li>
      <li>
          <label for="userPhoneNumber" class="hidden">{{ "Phone Number"|translate }}</label>
          <input type="text" name="fields[userPhoneNumber]" id="userPhoneNumber" placeholder="{{ "Phone Number"|translate }}" value="{{ currentUser.userPhoneNumber }}">
      </li>
  </ol>
  <input type="submit" value="Save Changes" class="button button--fw">
  
  ```
  
  **Tags:** users, user-profile, current-user
  
  > **Comments:**
  > **username_1**: Could this be because changing email address requires an [elevated session](https://craftcms.com/news/new-security-features)?  
  > **username_0**: Oh okay, thanks. That's new information for me. So I guess I need to prompt user to (re)enter their password when changing email address. I'll give it a shot.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-03-01. Score: 4
  
  Thanks to username_1's suggestion, adding a password field creates an elevated session, and solves my problem.
  
  ```
  <input type="password" name="password" placeholder="Password" required>
  
  ```
  
  Actually I don't think it's that intrusive, and it's a good security step that should generally be encouraged when making any profile edits.
  
  
  ---
  
  