Confirm Password WordPress
-
Hello, Good day WordPress Developer.
I need help currently I am working with my database in WordPress table users.
My project is a collection of lists of information in our team, each member will receive a temporary account they should able to update their password from their custom dashboard what I did is to update their password I give them custom form that I made with HTML/PHP.In this part of my codes, I got a problem. Can you help me to solve this?
* Before they update the password they should confirm the old one but every time I am trying to confirm I received an error.
<?php //... //... // here my if statement // when I confirm the old password from new one using md5 // it return incorrect password. if ( md5($_POST["currentPassword"]) == $row['user_pass'] ) { mysqli_query($connection, " UPDATE wpqu_users SET user_pass = MD5('" . $_POST["newPassword"] . "') WHERE ID = '" . $current_user->ID . "'"); $message = "Password Changed"; } else { $message = "Current Password is not correct"; }
Please Thanks for help :))
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Confirm Password WordPress’ is closed to new replies.