• Resolved DANjEEEEE

    (@danjeeeee)


    Rather than check just the first role a user has in:

    public function bausp_get_current_user_role() { … }

    Should this not check all the roles which a user has?

    I know in most cases a user would only have a single role but for sites which have users with multiple roles this presents a problem and potentially hides content despite them having the required role.

    This is something which I experienced with a customer website a few days ago and thought that it would be beneficial if the functionality was added to the plugin as standard.

    https://www.ads-software.com/plugins/user-specific-content/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bainternet

    (@bainternet)

    Added better support for multiple roles per user in 1.0.2

    thanks.

    @danjeeeee How would someone have multiple user roles assigned?

    Plugin Author Bainternet

    (@bainternet)

    Thread Starter DANjEEEEE

    (@danjeeeee)

    ^ above is one option.

    In my case, we have a plugin that I have developed to provide integration with the CRM package we sell.

    When automatically importing and creating users, we dynamically create a role if needed and assign that to the user (Determined by certain conditions within the CRM).

    I was leaving the user with the default role, and adding the new role as an additional role as this would provide extra user privileges on top of the default role.

    Hence the reason I posted here, I had already overcame the problem myself by modifying the user specific content plugin temporarily until the update was released a couple of days ago.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multiple user roles.’ is closed to new replies.