Now displaying error when admin user can't be created

This commit is contained in:
Maurice Meyer 2017-07-21 17:50:09 +02:00
parent 4c4269c1fa
commit 016183f244
No known key found for this signature in database
GPG key ID: 5D3C9B15D1BEE8BC

View file

@ -173,6 +173,7 @@ catch (PDOException $e) {
$retval['message'] = serialize($e);
}
if (!isset($retval)) {
try {
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$passwordHash = password_hash($input->userPassword, PASSWORD_DEFAULT);
$queries = explode(";", $sql[$input->type]);
@ -204,6 +205,11 @@ if (!isset($retval)) {
$retval['message'] = serialize($e);
}
}
catch (Exception $e) {
$retval['status'] = "error";
$retval['message'] = serialize($e);
}
}
if(isset($retval)) {
echo json_encode($retval);
} else {