Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function txp_validate($user,$password)
- {
- include_once txpath.'/lib/txplib_admin.php';
- $safe_user = doSlash($user);
- $pass_hash = doSlash(generate_pwd_hash(doSlash($password)));
- $name = safe_field("name", "txp_users", "name = '$safe_user' and pass = '".$pass_hash."' and privs > 0");
- if ($name !== FALSE)
- {
- // update the last access time
- safe_update("txp_users", "last_access = now()", "name = '$safe_user'");
- return $name;
- }
- return false;
- }
Add Comment
Please, Sign In to add comment