Hi, I'm using the option "User Role Assignment" where the user can select between four roles. Roles exist and show up at the registartion form. However the role is not assigned. I'm not sure what is interfering. I'm not doing anything special. I have 'Usernode' and 'Captcha' installed, I assume they don't have anything to do with it. How can I troubleshoot this? I have tried some other role assignment modules as alternatives, but really prefer this module if I can get it to work.

Thanks in advance for helping out.

Marius

Comments

lauscherli’s picture

I have the same problem. The choosing-role-buttons show up at registration, but after registration users only get the permissions of 'authenticated users', but not the rights of the specific role they assigned themselves when registering, and so also the badges for that specific roles don't show up (using advprofile).
Would be really nice... I know you are busy and look for co-maintainers...- but you don't want to have me code... I'll check DROP instead.

I'd be willing to pay a little bounty (50-100 USD) for this, as i only noticed this after i tried to go life (and lots of work i did before depends on this feature). Thank you.

jefftrnr’s picture

Status: Active » Needs review
StatusFileSize
new776 bytes

User Role Assignment Patch.
I think my patch fixes this role assignment issue.

The problem seemed to be with the way it sorts the role array in the form_alter hook. PHP multisort unassigned the key, making the values of the roles incorrect. I've replaced both function calls with asort and arsort. I've also removed the assignment selector from the register page if the user has user_access 'administer access control'. That way , when the admin user adds a user, he/she can simply select the role without having to select the autoassign role as well.

This is my very first durpal patch! (woo hoo!) but, I've test it and the changes are pretty small. I'm a bit unfamiliar with diff output formats, so please let me know if the patch needs adjustments. Hopefully it's done correctly.

ladylolauren’s picture

This patch is great...and much needed for my project! Thanks for taking care of this ;)

mariusooms’s picture

Thanks for patching this up...I will test in the coming days...most likely I won't need it anymore :) as I just started to migrate to Drupal 6. Any change this module will see the light of day on that version of Drupal?

Thanks a ton,

Marius

lauscherli’s picture

cool! i'm just going to try this out. if it works 4 me, contact me 4 the bounty (i promised), or i donate it to the drup-association.

-- It works :) ! Only drawback is that the user-badgets don't react propperly on it. I need to help them manually by resaving the badget-roles.

andypost’s picture

Cumulative patch and 6юч migration http://drupal.org/node/228774#comment-781025 supersedes this one.

giorgosk’s picture

I could not apply this patch with windows patch.exe

I was actually able to apply this patch though
http://drupal.org/node/228774#comment-791990

and it seems to be working

I don't really know what their difference is

reed.richards’s picture

Patch at 2# works but you have to do it manually or at least it doesn't work with Cygwin instead it messes up stuff badly.

30equals’s picture

hi reed.richards

could you possibly quickly explain how to change it manually ?
i've tried to, but i must be doing something wrong... though there isn't that much code to be altered.

thanx!

xxm’s picture

I've patched it but still the user is not directed to the chosen role. Did you only patch the autoasign.module or anything else?

reed.richards’s picture

StatusFileSize
new1.98 KB

I just opened up the patch file and tried to localize the corresponding lines in the module. It was a bit tricky because some lines were not on the exact number.

I am adding my patched module file below, but I am not taking any responsibility for it. Do a backup before if you overwrite with my file.

missym’s picture

Your patched mod worked for me.

menoseficaz’s picture

#11 Patch worked for me too - like a gem! Thanks reed!

karlblau’s picture

Great!! it worked for me 2!!

richygecko’s picture

yep #11 worked for me too.

cyberswat’s picture

Assigned: Unassigned » cyberswat
Status: Needs review » Fixed

new release coming out soon check dev snapshot for working code

Anonymous’s picture

Status: Fixed » Closed (fixed)

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