Very similar to #1777336: Anonymous checkout creates broken registration entities. I got some deja vu as I was writing this issue up.

If you enter an invalid user name during checkout for "Other account", then it will pass validation. It will also spew a few errors. This results in corrupt registration records that can only be corrected via manually correcting database entries.

The isset($account) will always pass because user_load_by_name returns a valid value boolean false. I think most examples just test $account or test an isset on a property on the account object.

Patch incoming for 7.x-2.x as soon as I get a node id.

Comments

mradcliffe’s picture

Title: Register user account checkout creates broken registrations » Register user with bad username creates broken registration
Status: Active » Needs review
StatusFileSize
new1.17 KB

Reword title and one-line fix patch for review.

Edit: just checked includes/registration.forms.inc:registration_form_validate() and it does similarly to the patch.

jpontani’s picture

Status: Needs review » Fixed

Fixed in latest dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.