<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>

CC BY-SA 3.0
2017-03-01T14:21:30.287Z
2017-03-01T14:21:30.287Z
Ian Ebden
<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>

CC BY-SA 3.0
2017-03-01T13:35:00.140Z
Could this be because changing email address requires an [elevated session](https://craftcms.com/news/new-security-features)?
billythekid
CC BY-SA 3.0
2017-03-01T13:54:33.450Z
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.
Ian Ebden
<users><user-profile><current-user>
Change email address on front end
# 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?

{{ getCsrfInput() }}





{{ "My Profile"|translate }}

    
        {{ "First Name"|translate }}*
        
    
    
        {{ "Last Name"|translate }}*
        
    
    
        {% if currentUser.unverifiedEmail %}
            
                {{ "Email verification pending"|translate }}
                {{ "We sent a verification email to"|translate }} {{ currentUser.unverifiedEmail }}. {{ "Until this email is verified, we’ll continue to use your previous email"|translate }} ({{ currentUser.email }}).
            
        {% else %}
            Email*
            
        {% endif %}
    
    
        {{ "Town/City"|translate }}
        
    
    
        {{ "Phone Number"|translate }}

**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.


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.


---

