Page 1 of 1

Hide for 2 groups

Posted: 2020-10-02 16:42
by fciprian
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! :!:

Re: Hide for 2 groups

Posted: 2020-10-02 18:46
by pbottcher
Hi,

try

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

like this you can expand the chk_array if needed.

Re: Hide for 2 groups

Posted: 2020-10-05 21:31
by fciprian
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