cgauthier444
8 years agoContributor
Multiple role if/then statement
Hello,
I'm trying to modify a custom component to show/hide when a user has one of two roles. I currently have it working with one role. Can anyone tell me how to modify to include an "or" type statement?
Here's the current if/then
<#list restadmin("/users/id/${user.id?c}/roles").roles.role as role>
<#if role.name?? && ((role.name == "myrole"))>
<#assign user_has_role = true />
<#if user_has_role>
<#attempt>
Thanks for any help!