Steps to reproduce:
1. As Administrator, manually assign role A to a Test User.
2. Use Registration Code Role Assignment module to add role B when they enter the correct code.
3. Enable and configure Registration Code Voucher System module.
4. Log in as Test User.
5. Go to My account and Edit. Enter the code from step 2.
6. Log back in as Administrator and observe that Test User now has role B, but has lost role A.

Simple one line patch attached.

CommentFileSizeAuthor
#3 regcode_roles2.patch455 bytesdaemonchrist
regcode_roles.patch348 bytesdaemonchrist

Comments

aidanlis’s picture

Status: Active » Fixed

I don't think your patch is entirely correct, as it wipes the existing roles form data if it exists. I've written a similar patch that checks for this, and it's available in the new version of the module.

Status: Fixed » Closed (fixed)

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

daemonchrist’s picture

Version: 6.x-2.2 » 6.x-2.4
Status: Closed (fixed) » Needs review
StatusFileSize
new455 bytes

This bug came back when I updated to 2.4

Please retest against the use case I described above.

I'm honestly not sure why this patch works, but it does.

aidanlis’s picture

Can you try using the version from CVS?

aidanlis’s picture

Status: Needs review » Fixed

Assuming fixed.

Status: Fixed » Closed (fixed)

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