Display menu with userlevel?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
elcmea
User
Posts: 6

Display menu with userlevel?

Post by elcmea »

How to seting only userlebel<>1 can see the menu

function MenuItem_Adding($item)
{
    if ($item->Text == "Item A" && $userlevel == 1) {
        $item->Allowed = false;
    }
}

arbei
User
Posts: 9384

Post by arbei »

You may check CurrentUserLevel().


elcmea
User
Posts: 6

Post by elcmea »

ok thanks for your help


Post Reply