We'd like to hide the registration form if your emailadres is already in use. As far as we can see, friendly_register does not have any hooks after the JSON call is performed.

Calling Drupal.attachBehaviors() at the end of the getJSON()'s in Drupal.friendly_register.checkUserName() and Drupal.friendly_register.checkEmail() fixes this, but this also re-attaches the friendly_register exponentially ;)

This can be fixed by adding a once() in the focus() attachments: userName.field.once('friendly_register').focus(function () {

A patch is on it's way!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MrHaroldA’s picture

MrHaroldA’s picture

Status: Active » Needs review
Andrew M Riley’s picture

Thanks for the patch MrHaroldA. These patches appear to work on the 8.x branch, did you mean for it to work there or in the 7.x branch?

Andrew M Riley’s picture

I've manually added this to 7.x while I try to get the 8.x version and 7.x version to match up in the existing JS.

MrHaroldA’s picture

Yeah, these patches are against the master branch; I patched my 7.x installation manually here ;)

Andrew M Riley’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev

Albert Volkman’s picture

Status: Needs review » Fixed

Thanks @MrHaroldA!

Albert Volkman’s picture

Version: 8.x-1.x-dev » 2.x-dev

Status: Fixed » Closed (fixed)

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