Script.php - Fixed Bug 510 - newly created account for lecturer/ TA can't log in with the default password
parent
67647de04a
commit
b78062c9da
|
@ -279,11 +279,12 @@ if (!empty($_POST["frm_createlecturrer"])) {
|
|||
$_SESSION["info_Admin_Users"]="Email address : ".$email." is already in use.";
|
||||
header("Location: Admin.php");
|
||||
}
|
||||
$password_hash = password_hash("$password-Lrr@2022", PASSWORD_DEFAULT);
|
||||
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
||||
. "('$email','$password','$fullname','$type')";
|
||||
. "('$email','$password_hash','$fullname','$type')";
|
||||
|
||||
if ($con->query($sql) === TRUE) {
|
||||
$_SESSION["info_Admin_Users"] = $type . " user Created successfully : email " . $email . " and $password as Password.";
|
||||
$_SESSION["info_Admin_Users"] = $type . " user Created successfully : email " . $email . " and $password-Lrr@2022 as Password.";
|
||||
header("Location: Admin.php");
|
||||
} else {
|
||||
echo "Error: " . $sql . "<br>" . $con->error;
|
||||
|
|
Loading…
Reference in New Issue