If you create a registration code with no tags and enable regcode_roles, when that code is used all defined rules will be applied to the user - so she will effectively get any role that is configured for this module.

The following diff excerpt shows the fix - can't generate a patch against head because I have to use an older version of the module bc of other issues.


@@ -248,7 +248,12 @@
   }
 
   // Grab applicable roles for category used
-  $rules = regcode_roles_get_rules($regcode->tags);
+  $rules = count($regcode->tags) ? regcode_roles_get_rules($regcode->tags) : array();
   if (count($rules)) {
     
     // If there's no roles fieldset, then simulate the fieldset with an empty array

Comments

aidanlis’s picture

Heh, neat bug. Will fix, thanks.

aidanlis’s picture

Status: Active » Fixed

Sorry for the delay!

Status: Fixed » Closed (fixed)

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