Skip to content
Snippets Groups Projects
Commit 2c457bbc authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1837962 by superspring, chx: Remove dead code from RegisterFormController.

parent a0ea12b3
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -99,14 +99,10 @@ public function save(array $form, array &$form_state) {
$admin = $form_state['values']['administer_users'];
$notify = !empty($form_state['values']['notify']);
// Save has no return value so this cannot be tested.
// Assume save has gone through correctly.
$account->save();
// Terminate if an error occurred while saving the account.
if ($status =! SAVED_NEW) {
drupal_set_message(t("Error saving user account."), 'error');
$form_state['redirect'] = '';
return;
}
$form_state['user'] = $account;
$form_state['values']['uid'] = $account->uid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment