- 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
5 months 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.
Automatically closed - issue fixed for 2 weeks with no activity.