Is there an action which assigns role/s to users?
i'm using workflow module to create an applycation form for a "membership", that way the administrator should be able to change among the workflows (aprove, pending, unaprove). i need that if the administrator changes the workflow to "aproved" then the user who filled that form (the author) would automatically be assign to a specific role which will grant him with new privilegies.
Comments
Comment #1
Soren Jones commentedThis is an idea that borrows from #2 in 156705 and ec_roles.module. There's probably a better way to do this, but this seems to work.
Comment #2
newmediaist commentedI just tried this code and can't seem to get it to work - has anyone had success testing it?
Thanks -
Comment #3
leanazulyoro commentedi used the workflow-ng module to achive this (http://drupal.org/project/workflow_ng), good luck
Comment #4
newmediaist commentedCan you elaborate? I have workflow_ng installed but can't figure out how to assign a role based on an action, as the supplied PHP code doesn't seem to work for me :(
Comment #5
moshe weitzman commentedthere is a user operation already - maybe reuse that code.
Comment #6
egbertb commentedDid you achieve this functionality?
I need something similar for D6: an action to change the role of all users belonging to a group, when a specified field (I think best thing is a workflow-state) in the group node changes.