• Resolved dkance

    (@dkance)


    Hi,

    I have two User Roles: A and B.
    I have two menus. One addressed to User A and another to User B when you are in the User B landing page.
    Each menu has a specific Login button that takes you to the Default login form for User A and another Login button for User B that takes you to a User B Login page (different login form).
    When User B logs in and is redirected to her Profile page, the Login button for User A still shows.
    So you can see a Login button next to a Logout one.
    How could I resolve it?
    Thanks!

    @champsupertramp

Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Support mansurahamed

    (@mansurahamed)

    Hi @dkance,

    Did you mean User A, B or role A,B? From your description, this is working like it’s supposed to work. If this is a custom button, you need to use some condition in your code to check and show the button based on which user is logged in.

    If you want to show specific menu items to specific roles, you can use our conditional menu features for that. Please follow this documentation for that https://docs.ultimatemember.com/article/132-conditional-menus

    Thanks.

    Thread Starter dkance

    (@dkance)

    Hi @mansurahamed,

    Thank you so much for your response.

    The documentation that you shared shows that one can “Select the member roles that can see this link”.

    When I access the “Who can see this menu link?” option it only allows me to select “Everyone, Logged in and out users”. There is no option for selecting member roles.

    Is there anything that I am missing?

    Thanks again.

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @dkance,

    If you choose “Logged in users” there you should see the role settings below.

    Thanks.

    Thread Starter dkance

    (@dkance)

    Hi @mansurahamed,

    Thank you for the tip.

    The issue now is that since we are talking about the “Login” button, it gets tricky to select who views the button being logged in.

    Currently User Role B logs in via the specific Login button on the User Role B page (there is a specific menu for Role B).

    Once the Role B user is logged in she sees the Role A user Login button plus the User B Logout button.
    I do not want this.

    So I have a logic problem that I do not know how to resolve:
    Who can see the Role A Login button while being logged in?
    I would like this button to be seen by not Logged in- not Role B users.
    So I cannot mark any of the non-Role B roles.
    If I choose Role B it would not work because when being logged in she would be able to see it too.

    Am I understanding this correctly?
    What would you suggest?

    Thanks

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @dkance,

    It’s still bit confusing when you are mentioning of login button. Is this button menu item? or custom button? You should be able to restrict all menu item using Ultimate Member restriction. You don’t have to use the same menu item(button) to achieve your requirement. You can create multiple instance of same item and use menu restriction there. For example one copy of login page(button) will only be available to Role A, another copy of same item will be available for Role B.

    Thanks.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter dkance

    (@dkance)

    Hi @mansurahamed,
    Thank you for the response.
    The Login button is a menu item.
    The only restriction I found related to a User Role is for logged in users.
    If a user is not logged in she will see the button.
    So, if Role B user is logged in and is visiting a non-restricted page, she will see the Role A Login button in addition to the Role B user loggout button.
    Could you give me a specific hint on how to resolve this?
    Thanks again.
    Best,
    Diego

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @dkance

    Did you try using the Ultimate Member menu settings to hide/show menus to specific role? Are you using an administrator account to test the menu visibility? It will display all the menus with restriction/visibility settings to the administrator.

    Regards,

    Thread Starter dkance

    (@dkance)

    Hi @champsupertramp,
    Thank you for the suggestion.
    I have an admin account.
    I tested your solution using Conditional menus (with the footer).
    It did not work and now a User B Role cannot access her User profile when logged in.
    It shows only the footer section and the main menu but the profile is not accessible.
    Even after disabling the conditional menu condition.
    For some reason it messed up things.
    The menu for Role B is not active any more and the login button was not directing the user to the appropriate user role login button.
    For some reason cannot restore the specific menu for the landing page for Role B.
    Not sure how to solve it.
    Thanks.
    Diego

    • This reply was modified 3 years ago by dkance.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @dkance

    Are you able to access the profile with a direct link /user/ ?

    Regards,

    Thread Starter dkance

    (@dkance)

    Hi @champsupertramp,
    Yes, I am able to access the profile and also able to login from the correct login form.
    What I am still struggling is to be able to configure the conditional menu (I already have a Role B menu) so that the Login button is the correct one on the Role B landing page.
    Also cannot resolve the double Login (A) logout (B) button coexistence.
    Best,
    Diego

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @dkance

    Are you able to provide a video clip so we can see the issue clearly?

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. ..Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter dkance

    (@dkance)

    Hi @champsupertramp,
    How should I share the video or image?
    Thanks,
    Diego

    Thread Starter dkance

    (@dkance)

    Hi @champsupertramp,

    I am sharing an image of the menu of Role B logged in to a his/her Profile page which is a page that can currently be accessed by anyone. You would notice the Login button (correponds to Role A user login) and the logout item related to Role B current logged in user.

    https://drive.google.com/file/d/1gJxfiA6cMz2k6_rCckUwFSYvgHzlzCVk/view?usp=sharing

    What logic should I use to remove the Login button (Role A User) when Role B user is logged in?

    I hope the image helps (menu is in Spanish).

    Thanks again!

    Best.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Login button for User Role A still visible when User Role B is logged in’ is closed to new replies.