Remove a user role

Created on 24 February 2025, 7 days ago

I have used the the add role example https://ecaguide.org/library/simple/add_role_to_inserted_or_updated_user/, however I have a similar flow, but need to remove a user role. I just like some pointers on how this could be achieved? Should it still be the "Entitiy: Set Field Value"? If so, how should the field value be set?

I know there is this action - https://ecaguide.org/plugins/user/actions/user_remove_role_action/#fields - however, this would not work in the above scenario (as Jürgen Haas mentions in the video, this cannot be used with the presave event).

Thank you for your help!

💬 Support request
Status

Active

Version

2.1

Component

Documentation

Created by

🇦🇺Australia ajlow

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ajlow
  • 🇦🇺Australia ajlow

    Just as I pressed "Save" I realised there are different methods available for the "Entity: Set Field Value" action!

    The method I was looking for is "Remove value instead of adding it". Using this works great!

    Thank you for a fantastic module! :)

  • 🇦🇺Australia ajlow
Production build 0.71.5 2024