|
|
@@ -30,6 +30,7 @@ if($submit) {
|
|
|
}
|
|
|
|
|
|
$user->level = http::value("level", "int");
|
|
|
+ $user->email = http::value("email", "email");
|
|
|
$user->title = http::value("title", "trim");
|
|
|
$user->first_name = http::value("first_name", "trim");
|
|
|
$user->last_name = http::value("last_name", "trim");
|
|
|
@@ -51,6 +52,7 @@ if($submit) {
|
|
|
if($form_exception->hasErrors()) throw $form_exception;
|
|
|
|
|
|
$success = $user->commit();
|
|
|
+ if(!$success) throw new Exception("User was not updated successfully. If the email was changed, another user may already be using that address.");
|
|
|
|
|
|
Core::addAlert("success", "User updated successfully.");
|
|
|
HTTP::redirect("/account/users/$id/edit");
|