Guest User

Untitled

a guest
Feb 20th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. function txp_validate($user,$password)
  2. {
  3. include_once txpath.'/lib/txplib_admin.php';
  4.  
  5. $safe_user = doSlash($user);
  6. $pass_hash = doSlash(generate_pwd_hash(doSlash($password)));
  7.  
  8. $name = safe_field("name", "txp_users", "name = '$safe_user' and pass = '".$pass_hash."' and privs > 0");
  9. if ($name !== FALSE)
  10. {
  11. // update the last access time
  12. safe_update("txp_users", "last_access = now()", "name = '$safe_user'");
  13. return $name;
  14.  
  15. }
  16.  
  17. return false;
  18. }
Add Comment
Please, Sign In to add comment