From 29ca936be9ac1df5ece03e1a04aa03cfc843d0e4 Mon Sep 17 00:00:00 2001 From: Yuri Salimovskiy Date: Thu, 2 Feb 2023 17:54:56 +0200 Subject: [PATCH 1/2] Enabled {exp:member:has_role} to check against multiple roles https://github.com/ExpressionEngine/ExpressionEngine/issues/2749 --- docs/member/member-roles-tags.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/member/member-roles-tags.md b/docs/member/member-roles-tags.md index 7a906c057..8eddc2a1c 100644 --- a/docs/member/member-roles-tags.md +++ b/docs/member/member-roles-tags.md @@ -72,6 +72,11 @@ The `{exp:member:has_role}` tag allows you to display or hide its content depend **Required** ID or role to check against. The content of the tag will be displayed if the user belongs to this role, otherwise `{if no_results}...{/if}` contents will be displayed. +It is also possible to pass multiple roles by separating those with a `|`. In this case, the content will be shown if the member belongs to at least one of the roles. + + role_id="6|12" + + #### `member_id=` member_id="147" From 7906ac71d26142157197de53a374e0b74cbbe630 Mon Sep 17 00:00:00 2001 From: Bryan Nielsen Date: Thu, 8 Feb 2024 11:55:45 -0500 Subject: [PATCH 2/2] Update member-roles-tags.md --- docs/member/member-roles-tags.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/member/member-roles-tags.md b/docs/member/member-roles-tags.md index 8eddc2a1c..e74668106 100644 --- a/docs/member/member-roles-tags.md +++ b/docs/member/member-roles-tags.md @@ -72,7 +72,7 @@ The `{exp:member:has_role}` tag allows you to display or hide its content depend **Required** ID or role to check against. The content of the tag will be displayed if the user belongs to this role, otherwise `{if no_results}...{/if}` contents will be displayed. -It is also possible to pass multiple roles by separating those with a `|`. In this case, the content will be shown if the member belongs to at least one of the roles. +It is possible to pass multiple roles by separating the ids with a `|` character. In this case, the content will be shown if the member belongs to at least one of the roles. role_id="6|12"