Skip to content

Commit

Permalink
issue: Account Registration Throws Errors
Browse files Browse the repository at this point in the history
This addresses issue 4898 where a User that clicks the ticket link in an
email alert to view the ticket, in that ticket view clicks the link to
register for an account, fills out the registration form, and clicks Create
will throw a an "Unable to register account. See messages below." error.
When the Users get this error there are no messages below so they can't see
anything to fix which prevents them from creating an account. This is due to
the email field being disabled which means the value is not sent in POST so
the system thinks the User sent no email address which throws a hidden
"Email field required." error. We disabled the email field to prevent an
attacker from accessing the user’s guest login and registering the user with
a different email (possibly his own). This sets a POST value called 'email'
to the client's email so that the registration process acknowledges and
validates the email allowing registration to continue.
  • Loading branch information
JediKev committed May 23, 2019
1 parent fac1c2d commit a720507
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions account.php
Expand Up @@ -58,6 +58,7 @@
if ($thisclient) {
$user_form->getField('email')->configure('disabled', true);
$user_form->getField('email')->value = $thisclient->getEmail();
$_POST['email'] = $thisclient->getEmail();
}

if (!$user_form->isValid(function($f) { return !$f->isVisibleToUsers(); }))
Expand Down

0 comments on commit a720507

Please sign in to comment.