This topic is locked

Hiding "Change password" menu item for demo account

9/20/2017 1:33:59 PM
PHPRunner General questions
mbintex author

Hi,
trying to hide the change password menu item in the user/admin menu popup with something like this:

$title= $menuItem->getTitle();
if ($_SESSION["GroupID"]!="Admin" && $title=="Backup")

{

return false;

}

if ($_SESSION["UserID"]=="demo" && $title=="Passwort ändern")

{

return false;

}
return true;


in Menu Item Modify event.
While the Backup-Menu entry is hidden, when a non Admin signs in, nothing happens to the "change password" menu entry (in German that is "Password ändern").
Any ideas what I can do to prohibit demo/demo users from changing the demo-password?