Alumni – Set User Role to “Contributor” for users without posting listing

Status: 

Closed

Priority: 

N/A

Test URL(s):

References:

Request(s):

Housekeeping on registered alumni

Criteria:

Set users currently with “subscriber” user role to “Contributor” user role if he/she has not posted any listing.

Search from the Sabai Directory Listing, find those users with listing published.

Check against all “subscriber” users, if they are not on the listing author group,
change their user role to “no role”. As shown in the screenshot below.

Need to find exact table(s) and field(s) to update for the user role changes.
It could involve WP vbuilt-in User table, Sabai and Ultimate Membership plugins related Usermeta table.

Collect all authors who have published at least a listing.
Set other users who are not on this author group and whose user role is subscriber, change their user role to “no role”.

Once a user’s role is set to “no role”, it would display “None” on the User list.

For now, set it to Contributor, then strip access control to “Subscriber”.

Check the Reference doc for details. 12/19/2022

2 thoughts on “Alumni – Set User Role to “Contributor” for users without posting listing”

Leave a Comment