Changing User roles in Admin not working

Hi, is there a way to dynamically change user roles in HivePress if the role is updated let’s from Contributor back to Subscriber via the admin dashboard? Because currently changing the user role of a user who becomes a vendor(Contributor) via the admin area does nothing, the user remains a vendor and is able to add listings even when it is showing subscriber in the backend.

  1. And can you assist with a snippet to query regular users excluding users with a vendor profile?

Hi,

Unfortunately, there is no such possibility because, with any update, the user will automatically be assigned the Contributor role because this is the minimum role in WP to own content (we recommend not using the Subscriber role, as there may be issues with it). If you are writing a query code, you can get the role using get_users.

​I hope this is helpful to you.

Thanks. So for regular users I shouldn’t assign them the subscriber role but something different like a custom “candidate” role?

Hi,

Usually, ordinary users have the Subscriber role.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.