Thank you for this module. It has been very useful.
Whenever my users register with a code, they get assigned a role. This works fine but I also see an additional bullet point. Please see attached image.

CommentFileSizeAuthor
regcode_role.jpg3.97 KBfehin

Comments

aidanlis’s picture

Perhaps you created a role, and a rule, then deleted the role? Can you empty the regcode_roles table and see if this still happens?

aidanlis’s picture

Status: Active » Fixed

I'm going to assume this is what happened.

fehin’s picture

Status: Fixed » Active

I did not create a role and a rule and delete it. The role already existed before I install the regcode module. I emptied the regcode_roles table but nothing changed.

aidanlis’s picture

Hrmm okay I'm not sure why this is happening, but I have replicated the problem. To fix it, you can do a "DELETE FROM regcode WHERE rid=0". I'll get a patch into the next release when I work out what's going on.

chellman’s picture

Category: support » bug

I've also noticed this. I'm changing this to a bug report to remind me to look at it.

aidanlis’s picture

Status: Active » Fixed

Fixed in dev release. It's actually a bug in drupal that needs to be worked around.

Status: Fixed » Closed (fixed)

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

rpsu’s picture

Thanks aidanlis - your module is excellent for mass user registration management.

I've got the same issue at least a couple of times - but couldn't reproduce it yet. Still trying...

In my case user is given extra role ({users_roles} -table, user has a role with rid == 0). There are no rows in regcode -table

SELECT * FROM regcode WHERE rid = 0 
--> no rows.

But user is given an extra role:

SELECT * FROM users_roles WHERE rid =0
--> 1 row

And naturally there is no role with rid = 0 in roles-table. I'll let you know if I can reproduce this and trace the reason for it.

So far it's only a bit confusing in /admin/user/user -list, but seems to cause no other problems AFAIK.

aidanlis’s picture

Are you using the latest -dev version?

rpsu’s picture

No, I am (was) using 6.x-2.4. I am about to update it in a few days. I'll get back to this then.