Skip to content

[5.x]: User conditional not applied when starting project, inspite it being set in the project config #15037

@boboldehampsink

Description

@boboldehampsink

What happened?

Description

A user conditional with the following rules is not applied when starting a project for the first time:

userCondition:
              class: craft\elements\conditions\users\UserCondition
              conditionRules:
                -
                  class: craft\elements\conditions\users\GroupConditionRule
                  operator: in
                  uid: 34b06532-29f1-44a6-9acf-ba26f8a7389e
                  values:
                    - 21006657-ecd9-43d2-8813-4cfc3db35488 # **USERGROUP**
              elementType: craft\elements\User
              fieldContext: global

Steps to reproduce

  1. Create a usergroup
  2. Create an entry type
  3. Add a field with the condition as seen above
  4. Verify that it works
  5. Close down project
  6. Start it up from scratch

Expected behavior

User condition in place

Actual behavior

No user condition in place, inspite it being saved to PC

Craft CMS version

5.1.2

PHP version

8.3

Operating system and version

No response

Database type and version

PostgreSQL

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions