This topic is locked
[SOLVED]

How to hide the new "User profile" menu link in 10.5

4/12/2021 9:18:59 AM
PHPRunner General questions
mbintex author

Hi,

for demo users I want to hide the "user profile" menu link.

But

$title= $menuItem->getTitle();
if ($title=="User Profile")
{
return false;
}

in Menu-item modify event does not do the trick. What can I do?

admin 4/12/2021

"User profile" link is not a menu item. This a special item and your best option to hide it is to use Custom CSS or Javascript.

Javascript:
$("li[data-itemid=userinfo_link]").hide();

A
Andreas G. 4/14/2021

Question:
Do I have to put this on every page?
The user menu should not appear for any user.

admin 4/14/2021

You can add this code to common Javascript functions and it will be executed on every page.

mbintex author 4/16/2021

Instead of hiding the menu item I now hide the buttons/edit fields for public demo users for password reset and changing user name.

D
david22585 4/27/2021

I tried to use your solution Sergey, and the User Profile link still shows in the menu button for the user.