A
A
Alexander Konovalov2019-02-07 16:45:36
Smarty
Alexander Konovalov, 2019-02-07 16:45:36

How to add a group correctly?

Hello! There is a code that opens access to content to certain user groups:

{if $smarty.session.current_user_group_name eq 'admin'}

You need to add another realtor group to the admin. How to spell it correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2019-02-07
@Huf

{if $smarty.session.current_user_group_name eq 'admin' || $smarty.session.current_user_group_name eq 'relator'}

V
Vitsliputsli, 2019-02-07
@Vitsliputsli

It's also possible like this:
in principle, in_array can also be used in a purely php syntax

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question