generated from jric11/baseProject
a bunch of stuff happened. I'll do better next commit...
This commit is contained in:
@@ -47,7 +47,6 @@ class Authentication {
|
||||
$host = 'localhost';
|
||||
} else {
|
||||
$host = '192.168.1.190';
|
||||
$host = '100.67.215.67';
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -78,7 +77,7 @@ class Authentication {
|
||||
$password = '';
|
||||
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$index = rand(0, strlen($characters) - 1);
|
||||
$index = random_int(0, strlen($characters) - 1);
|
||||
$password .= $characters[$index];
|
||||
}
|
||||
|
||||
@@ -186,14 +185,14 @@ class Authentication {
|
||||
$user_temp_password = password_hash($user_random_password, PASSWORD_DEFAULT);
|
||||
|
||||
$SQL = "update users
|
||||
set user_password = :user_password,
|
||||
set user_password_hash = :user_password_hash,
|
||||
user_change_password = :user_change_password
|
||||
where user_serial = :user_serial";
|
||||
|
||||
$statement = $this->ghrconnection->prepare($SQL);
|
||||
|
||||
$statement->bindValue(":user_serial", $user_serial);
|
||||
$statement->bindValue(":user_password", $user_temp_password);
|
||||
$statement->bindValue(":user_password_hash", $user_temp_password);
|
||||
$statement->bindValue(":user_change_password", 1);
|
||||
|
||||
$statement->execute();
|
||||
|
||||
Reference in New Issue
Block a user