Hiding User Profile Menu

Answered

3 Comments

  • Ifra Saqlain
    Community Moderator

    Hey Binny,

    You can add this CSS code for hiding the user profile menu at the bottom of your stylesheet.

    #user #user-dropdown{
    display:none
    }

     

    OR

     

    you can only hide the Change Password menu-item in the user profile dropdown menu.

    #user #user-dropdown a:nth-child(3){
    display:none;
    }

     

     

    And, if maybe it doesn't help then let me know.

     

    Thank You

    Team

    0
  • Binny Panchal

    Thanks Ifra Saqlain. I tried this

    #user #user-dropdown{
    display:none
    }

    and it removes only change password menu and not entire user though. Also I want to remove it for specific set of users not all users. what changes do i need to make it visible to some users and invisible to others.

    0
  • Ifra Saqlain
    Community Moderator

    Hey Binny,

    Now, Please try this.  Add this code at the bottom of your script.js file.

    $(document).ready(function(){
    var userRole = HelpCenter.user.role;
    if (userRole == 'manager' || userRole == 'agent') {
    $('#user').hide();
    }
    });

     

    You can change the users by updating userRole

    (userRole == 'manager' || userRole == 'agent')

    it could be

    (userRole == 'end_user' || userRole == 'manager')

    and only for one user

    (userRole == 'end_user')

     

    You can hide user profile menu from end-users, manager and agent just need to update userRole and user profile would be hide.

     

    Also, you can hide or show whatever you want from any user.

     

    Let me know if any issue :)

     

     

    Thank You

    Team

    0

Please sign in to leave a comment.

Powered by Zendesk