I am using FrontEndUsers but only really need it a few times per year on request. the rest of the time i would like to keep it disabled.
How can i test in smarty whether or not the (a) module is installed and active? something like {if is_object(feu_smarty)} Yeah {/if}. Thank you.
test if module (FEU) is installed and active
Re: test if module (FEU) is installed and active
Check CGExtensions module {cge_have_module}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: test if module (FEU) is installed and active
Thanks Rolf. {cge_have_module} works fine but it does not prevent execution of FEU code The code works fine with FEU enabled, but i get an OOPs when FEU is disabled, "access to static class 'feu_smarty' not allowed by security setting". Looks like what i want to do cannot be achieved?
Code: Select all
{$is_rpc_agent = false scope=global}
{$hasFEU = {cge_have_module module='FrontEndUsers'}}
{if $hasFEU}
{if feu_smarty::is_user_memberof('sales_staff')}
{$is_rpc_agent = true scope=global}
{/if}
{/if}
Re: test if module (FEU) is installed and active
Try $config['permissive_smarty'] = 1; in config.php
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: test if module (FEU) is installed and active
That does the trick. Cheers!