Skip to content
Snippets Groups Projects
Commit 4a371e40 authored by JediKev's avatar JediKev
Browse files

issue: Existing User Registration

This addresses an issue where registering as a non-existing user fails to
register nor create an account. This is due to a check added in `824e92`
that fails if there is no User model found for the address provided.
parent 4a4d5452
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ elseif ($_POST) {
elseif (!$user_form->getField('name')->getClean())
$errors['name'] = sprintf(__('%s is a required field'), $user_form->getField('name')->getLocal('label'));
// Registration for existing users
elseif ($addr && !($user = User::lookupByEmail($addr)))
elseif ($addr && ($user = User::lookupByEmail($addr)) && !$user->updateInfo($_POST, $errors))
$errors['err'] = __('Unable to register account. See messages below');
// Users created from ClientCreateRequest
elseif (isset($_POST['backend']) && !($user = User::fromVars($user_form->getClean())))
......
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