Skip to content

Issue with has_role tag #4549

Closed
Closed

Description

@robinsowell

Had a report come in that has_role tag is not consistently correct. Tested in 7.5.1:

{exp:member:has_role role_id="6" member_id="2"}
  <p>Has role 6</p>
  {if no_results}
    <p>Not an editor</p>
  {/if}
{/exp:member:has_role}

What I found was it worked UNLESS the primary role was also checked in the additional roles.

Editor is role id 6.

Screenshot 2024-10-23 at 2 33 48 PM

Output: Not an editor

Screenshot 2024-10-23 at 2 35 21 PM

Output: Has role 6

There might be more going on in there, but I can replicate the above.

Activity

  1. added
    Bug: Accepted
    on Oct 23, 2024
  2. added a commit that references this issue on Oct 24, 2024
    ea26d1f
  3. added a commit that references this issue on Oct 25, 2024
    ff32228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: Accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Sponsor
      SponsoredKunjungi sekarang
      Promo