- Issue created by @nigelwhite
- π¨πSwitzerland wengerk Lausanne
Hello Nigelwhite,
You can find the answer on the documentation > Usage > Security β
The
bamboo_has_role
function returns a boolean if the current|given user has the requested role.- param1,
role
string
. - param2,
user
int
- User id instead of the current logged user.
{% set user_id = 1 %} {# Does the given user have the given role ? #} {{ bamboo_has_role('authenticated', user_id) ? 'TRUE' : 'FALSE' }}
- param1,
- Status changed to Fixed
1 day ago 11:14am 1 July 2024 - π¨πSwitzerland wengerk Lausanne
Please re-open if you still have some questions about this security bamboo twig component.
- π¬π§United Kingdom nigelwhite Marsden
I understand it now and it works great.
I've spent ages looking for a way so many thanks indeed.