Hide for 2 groups

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
fciprian
Veteran Member
Posts: 53
Joined: 2020-04-20 10:51

Hide for 2 groups

Post by fciprian » 2020-10-02 16:42

Hello again. And thank you again for your help! :!:

A few months ago i wanted to hide " Verified " filed and shown only to Admins group. Now i want to show also to " Managers " group.
What i should add to add the Managers groups to wiew the Verified ? :?:

I have insered in footer-extras for Admins:

<?
$memberInfo = getMemberInfo();
if($memberInfo['group'] !='Admins'){
?>
<script type='text/javascript'>
document.observe("dom:loaded", function() {
$j('label[for="Verified"]').parent().hide();
});
</script>
<?
}
?>


Thank you verry much! :!:

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1709
Joined: 2018-04-01 10:12

Re: Hide for 2 groups

Post by pbottcher » 2020-10-02 18:46

Hi,

try

$chk_array=array('Admins','Managers');
if(!in_array($memberInfo['group'] , $chk_array){

like this you can expand the chk_array if needed.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

fciprian
Veteran Member
Posts: 53
Joined: 2020-04-20 10:51

Re: Hide for 2 groups

Post by fciprian » 2020-10-05 21:31

Thank you veeeeerrrry verrrry veeeeeeeryy much!

You forgot an ) but i say this only that others that is reading and needs this help to see here :

$chk_array=array('Admins','Managers');
if(!in_array($memberInfo['group'] , $chk_array)){

Again, thank you veeeeerrrry verrrry veeeeeeeryy much! I apriciate

Post Reply