Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Assign Role Based On content_profile Field Selection
I'm trying to do this with d6.
just wondering how using content_profile helps assign a role conditionally, based on information entered in the profile fields?
for example:
if user choose university A from dropdown list ---> his role selected as A university student
if user choose university B from dropdown list ---> his role selected as B university student
thanks
Comments
Comment #1
TechNikh CreditAttribution: TechNikh commentedI am looking for this feature too. did you find any solution?
Comment #2
TommyK CreditAttribution: TommyK commentedI am also looking for something like this. Any updates?
Comment #3
Taxoman CreditAttribution: Taxoman commentedComment #4
hefox CreditAttribution: hefox commentedThis issue is specifically d6, why was it moved to d7? content profile isn't for d7 last I heard.
If can create a module, which can be rather simple, don't really need auto assign role, just a simple module that does hook_nodeapi $op == 'insert' || $op == 'update', and save the user account with new role based on cck field.
Comment #5
armin1980 CreditAttribution: armin1980 commentedDesperately need it! Tried almost everything, to my knowledge it needs a new module
Comment #6
dalvir CreditAttribution: dalvir commented@hefox thnx
i did this to work for my website in d6, i used content profile module for profile field
in my own module for website, handle hook_nodeapi
$node->field_utype[0]['value'] is my cck field for user role (single choice only, for multiple use foreach)