• Resolved Jorge

    (@ganix33)


    Hi,

    First of all, thanks a lot for you great plugin. I recently discovered it and I think it’s great!

    I have a user with more than one role. Let’s say that Role_1 is his primary role and Role_2 is his secondary one. I grant access to Role_2 in FM settings but FM is not shown when user log is. If instead I assign Role_2 as primary FM is properly shown.

    Would it be possible to get FM show with ANY granted role, no matter if primary or secondary?

    Thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Bruce

    (@ninjateamwp)

    Hi @ganix33 ,

    Thanks for using Filester!

    May I know what plugin you have used to create those roles, please?

    Note that our plugin works well with WordPress’s role types only and may not work well with a role plugin.

    Kind regards,
    -Bruce-

    Thread Starter Jorge

    (@ganix33)

    Hi,

    I use User Role Editor.

    Thanks for your response!

    Hi @ganix33,

    Thanks for your patience.
    If you want more than 1 role, please tick “Select User Roles to access” like this https://screenrec.com/share/rRozvTE1we

    Please let me know if it works for you.

    Cheers,
    Rose

    Thread Starter Jorge

    (@ganix33)

    Hi, Rose,

    Yes, I know I can grant access to more than one role. The problem comes when I have a user with more than one role.

    I have created role called filester and assigned it to some users to access Filester. If role filester is not the primary one for a user it is ignored. The problem is in this line of FileManager.php

    $this->userRole = $user && $user->roles && $user->roles[0] ? $user->roles[0] : '';

    As you can see only the first role is observed, the rest are ignored.

    Thanks for your response!

    Hi @ganix33,

    Thanks for working with me on this topic.
    Our developer has looked them up, but since it’s related to code structure so we have to do and can not change them.

    Cheers,
    Rose

    Thread Starter Jorge

    (@ganix33)

    OK, I understand. Thanks for your attention and keep on doing so nice job.

    Cheers,
    Jorge

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘User with more than one role’ is closed to new replies.