Answers.Body: <p>Craft has a similar concept in the Control Panel for changing sensitive data like passwords/emails you could model called <a href="https://craftcms.com/news/new-security-features" rel="nofollow noreferrer">"elevated sessions"</a>.</p>
  
  <p>You could write a custom plugin and your form could post to an action in a controller in your plugin, which could check if the phone number for that user has changed.</p>
  
  <p>If so, you'd prompt the user to enter their current password and either do something similar to Craft's <a href="https://github.com/craftcms/cms/blob/develop/src/controllers/UsersController.php#L231-L239" rel="nofollow noreferrer">UsersController->actionStartElevatedSession</a>, if you need it to last for period of time, or just validate the password and let it go through once.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-18T23:47:14.200Z
Answers.LastActivityDate: 2018-07-18T23:47:14.200Z
Answers.UserDisplayName: Brad Bell
Body: <p>Is it possible to enforce users to enter their password when changing their data?
  For example when changing their phone number.</p>
  
  <p>Thanks in advance</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-17T20:52:30.590Z
Comments.Text: Is this in the context of a front-end request or editing a user in the Control Panel? Are you comfortable with writing a plugin/PHP?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-18T06:26:26.647Z
Comments.Text: Thanks for replying.
  This is a front-end request. So I should write a plug-in to do it ??
Comments.UserDisplayName: Flying Car 0013
Tags: <elevated-session>
Title: How do I make it required to enter password when changing user data?
ThreadText: # How do I make it required to enter password when changing user data?
  
  (Asked by: username_0 on 2018-07-17)
  
  Is it possible to enforce users to enter their password when changing their data?
  For example when changing their phone number.
  
  Thanks in advance
  
  **Tags:** elevated-session
  
  > **Comments:**
  > **username_1**: Is this in the context of a front-end request or editing a user in the Control Panel? Are you comfortable with writing a plugin/PHP?  
  > **username_0**: Thanks for replying. This is a front-end request. So I should write a plug-in to do it ??  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-18. Score: 1
  
  Craft has a similar concept in the Control Panel for changing sensitive data like passwords/emails you could model called ["elevated sessions"](https://craftcms.com/news/new-security-features).
  
  You could write a custom plugin and your form could post to an action in a controller in your plugin, which could check if the phone number for that user has changed.
  
  If so, you'd prompt the user to enter their current password and either do something similar to Craft's [UsersController->actionStartElevatedSession](https://github.com/craftcms/cms/blob/develop/src/controllers/UsersController.php#L231-L239), if you need it to last for period of time, or just validate the password and let it go through once.
  
  
  ---
  
  