From the course: PHP with MySQL Essential Training: 2 Build a CMS

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Optional password updating

Optional password updating

- [Instructor] We've almost completed our discussion of user authentication. We've been able to store encrypted passwords in the database. To have users log in and check to see if a password matches. We're able to protect pages to make sure users are logged in and were able to log out. So what topic is there left? Well, there's minor detail in the fact that we don't always want to update the password in the database. And I want us to address that in this movie. Let me demonstrate to explain. Here I am logged in to the staff area. I'm going to click on admins. We want to create a new admin. We know that we always want to provide a password when we're creating that admin. And it is required. Our validations require it or it won't let us create this admin. However, when we go to edit a user, you'll notice that we don't see their password here. Their password is left blank. It's encrypted in the database. So there's no way we could display the password to them here. But what if we wanted…

Contents