user entities not showing

Created on 7 June 2022, over 2 years ago
Updated 14 February 2024, 9 months ago

Problem/Motivation

Drupal 9.3.15
Rules 3.x-dev

My issue is the same as has been mentioned in other tickets - the user entities are not visible to me. But none of the advice offered in those tickets has been helpful in fixing my problem.

My requirement is to add/not add a user to a role based on information submitted via a webform. I think/hope that the Rules Webform and Rules User Fields modules together can provide a solution. However, even after following the example (which is not what I actually want to do) of setting up a "Create New User" action first, followed by "Get Access to User Fields", no entity.X values are visible.

Steps to reproduce

Rules->Add Reaction Rule->React on Event "Webform Submit"
Add Action -> Create a new user entity -> Value "randomusername"
Add Actiion -> Get access to user fields -> Start typing "entity" in Data Selector - no entities are available.

I'm probably just misunderstanding the README. I'd be grateful for any help.

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΈπŸ‡¦Saudi Arabia ishore

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΏπŸ‡¦South Africa matthew gibbon South Africa KZN

    Many years later I comment and maybe with developments this has relevance. I am trying to edit a custom data value inside of user which I cannot find through the data "@user.current_user_context:current_user" selection in action.

    So add condition "entity is of bundle". However now in version 10.2.2 there is no enable/disable data selections. Just forced auto data selection for "Entity
    Specifies the entity for which to evaluate the condition."
    of which I select "@user.current_user_context:current_user" - have tried just "user" but form rejected.

    Type
    The type of the evaluated entity.
    Of which I have tried both "@user.current_user_context:current_user" - and "user"

    Bundle
    The bundle of the evaluated entity.
    of which I have tried both "@user.current_user_context:current_user" - and "user"

    Any advice appreciated?

  • πŸ‡¨πŸ‡ΏCzech Republic czeky

    Hi, I have the same problem on 10.2.1 field "Entity" does not accept "user" and returns the error "Data selector user for context Entity is invalid. Unable to get variable 'user'; it is not defined." I need to compare user custom field value == 1

    thanks!

  • If you have a budget for it, feel free to contact me. Also, it's look that today, the ECA β†’ module is a good alternative to the Rules module.

Production build 0.71.5 2024