disarmed a bomb
parent
daba18d1d0
commit
1d689fba1b
|
@ -38,13 +38,13 @@
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
//add user
|
//add user
|
||||||
$statement = $pdo->prepare('INSERT INTO users (name, authentication_string, authentication_salt, authentication_algorithm) VALUES (:name, :authentication_string, :authentication_salt, :authentication_algorithm)');
|
$statement = $pdo->prepare('INSERT INTO users (name, authentication_string, authentication_salt, authentication_algorithm) VALUES (:name, :authentication_string, :authentication_salt, :authentication_algorithm)');
|
||||||
$result = $statement->execute(array('name' => $_POST['name'], 'authentication_string' => hash($password_hash_method, $_POST['password'] . $random_salt), 'authentication_salt' => $random_salt, 'authentication_algorithm' => $password_hash_method));
|
//$result = $statement->execute(array('name' => $_POST['name'], 'authentication_string' => hash($password_hash_method, $_POST['password'] . $random_salt), 'authentication_salt' => $random_salt, 'authentication_algorithm' => $password_hash_method));
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//You know, just in case... (To be removed after proper error handling is in place)
|
//You know, just in case... (To be removed after proper error handling is in place)
|
||||||
echo $error_message;
|
//echo $error_message;
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue