Hello. In this lesson, we'll look at re-authenticating for sensitive actions. Even if we expire sessions, hackers could still do a lot of damage before the session expires. Another tactic we can use to limit damage is to force the user to enter their password for sensitive actions. This is used by a lot of web commerce apps. We're going to treat editing a profile as a sensitive action. The first step is to provide a field in the edit profile screen for the user to enter in their current password. We're gonna do that in the template file. So here we have the template file for the profile editor, and we can see we have commented out currently space for their current password. So we uncomment that and save it. Now, if we refresh that page, we'll see that they have space to type in their current password. The second step is to validate the password in the profile editing script. So if we look at edit profile.php, we can see that on lines 23 and 24 we have code that will check the password to see if it is the same as the user's password. Well, uncomment that and then save it. Now we should be able to go and actually test this. So if we make a change to the profile and then enter in something other than the user's actual password, we can see that the change was not made. We enter in the user's actual password. We can see that the change was made. This prevents a hacker from stealing a session and then editing the profile. They can still do other things. For example, as an admin, they could still delete posts. We should probably treat that as a sensitive action as well and reprompt the user for their password. In general, you do not want to reprompt the user for their password for every single action, because that will quickly get annoying to the user. So narrow down your list of actions to those that are sensitive enough that they can do damage if a hacker were to be able to perform them and then re-verify just for those. Thanks for watching. In the next lesson we'll look at storing sensitive data encrypted.