forked from ferchang/reg8log
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode_verify_password.php
More file actions
25 lines (18 loc) · 834 Bytes
/
Copy pathcode_verify_password.php
File metadata and controls
25 lines (18 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
if(ini_get('register_globals')) exit("<center><h3>Error: Turn that damned register globals off!</h3></center>");
if(!isset($parent_page)) exit("<center><h3>Error: Direct access denied!</h3></center>");
require_once $index_dir.'include/code/code_db_object.php';
require_once $index_dir.'include/func/func_secure_hash.php';
$query='select `password_hash` from `accounts` where `username`='.$reg8log_db->quote_smart($identified_user).' limit 1';
$reg8log_db->query($query);
$rec=$reg8log_db->fetch_row();
if(isset($_POST['curpass'])) {
$password=$_POST['curpass'];
$tmp15=tr('the current password that you entered was incorrect!');
}
else {
$password=$_POST['password'];
$tmp15=tr('the account password that you entered was incorrect!');
}
if(!verify_secure_hash($password, $rec['password_hash'])) $err_msgs[]=$tmp15;
?>