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
Comment #1
aidanlis commentedHeh, neat bug. Will fix, thanks.
Comment #2
aidanlis commentedSorry for the delay!