Advertisement
Guest User

Untitled

a guest
May 6th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $username = '';
  2. $password = '';
  3.  
  4. $strSql = "SELECT user_pass FROM wp_users WHERE user_login = '$username'";
  5. $result = mysql_query($strSql);
  6. $row = mysql_fetch_array($result);
  7. $encpass = $row['user_pass'];
  8.  
  9. if(!is_null($encpass)) {
  10. include('classhash.php');
  11. $wp_hasher = new PasswordHash(8, TRUE);
  12. $password_hashed = $encpass;
  13. $plain_password = $password;
  14.  
  15. if($wp_hasher->CheckPassword($plain_password, $password_hashed)) {
  16. echo "Success";
  17. }
  18. else {
  19. echo "Failed";
  20. }
  21. }
  22. else {
  23. echo "Not found.";
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement