Display Change Password link based on user level

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

Display Change Password link based on user level

Post by trf »

I am mixing authentication using the function User_CustomValidate. Users that authenticate with ldap are in a specific user level. all registered users are in a different user level. I need the change password link to not appear for anyone in the first user level. is this possible? I am currently using phpmaker 9.x


danielc
User
Posts: 1601

Post by danielc »

Add this code to MenuItem_Adding server event:
if (CurrentUserLevel() == x)
{if ($Item->Text == "Change Password") // Change Password menu will not show for this user level
return FALSE; }


mobhar
User
Posts: 11747

Post by mobhar »

If you are running the multi language web app, then try this:

if (CurrentUserLevel() == x) { // adjust x with your desired current user level
if ($Item->Text == $Language->Phrase("changepwd")) {
return FALSE;
}
}


Post Reply