Hi,

i need to use the rules integration but the 7.x-1.1 version doesn't support the tags comparaison.

The dev version fix this issue (data comparaison) but a new issue appears.
The registration code has to be in my case is optional : (user can register without code. The code only grant new role)
My goals in rules is to add the term associated to the registration code vocabulary to the user account.

The rules works very well but :

With the optional parameter set, when a user try to register without code => blank page : impossible to register.

Does anyone has an idea to fix-it ASAP or tell me how to fix it ?

best regards

Comments

dsivori’s picture

Status: Active » Needs work
HongPong’s picture

Title: user register without code doesn't work when code is optional » user register without code doesn't work when code is optional - PHP Fatal error: Cannot break/continue 1 level

Definitely hit this . had
PHP Fatal error: Cannot break/continue 1 level in /sites/all/modules/regcode/regcode.module on line 199

function regcode_user_insert(&$edit, $account) {
  if (empty($edit['regcode'])) {
    continue;
  }

re here http://us2.php.net/continue
I think a continue statement cannot be used in an If statement without breaking things, it's more to be used in while statements.

nithinkolekar’s picture

same here with latest dev..

jlenni’s picture

same issue with latest version 1.2. Just use return instead of continue should do the trick

  • Ayesh committed 45540b9 on 7.x-1.x
    Issue #2183913: user register without code doesn't work when code is...
Ayesh’s picture

Thanks everyone!
This issue was also mentioned in #2446157: SA-CONTRIB-2015-065 - Fix comment 14. This 1.2 version is purely a security release, and I'm working on both 1.x-dev and 2.x-dev branches to fix the remaining issues as soon as possible.

This is fixed in current latest 1.x-dev version, and a 1.3 version will be released soon with some other bug fixes.

Ayesh’s picture

Status: Needs work » Closed (fixed)
dadderley’s picture

Just noticed this on 2 of my sites.
The 1.x-dev version cleared it up in both cases.