@AJD
AJ,
Unfortunately, you cannot search on the s2Member User Role as the code to do so does not exist.
search_columns
If you supply a search keyword (or phrase) these are the wp_users table
columns that will be searched. This should be a comma-delimited list of wp_users table
columns. The default is ID,user_login,user_email,user_url,user_nicename,display_name
. Plus, s2Member will also search (by default) some additional usermeta columns: first_name,last_name,nickname
.
Note: It is also possible to search any usermeta field in WordPress; e.g., description, s2member_subscr_id, s2member_subscr_gateway
, or any other usermeta field added by a plugin other than s2Member.
Note: It is also possible to search Custom Registration/Profile Fields you created with s2Member. To search custom fields use s2member_custom_field_[my unique id]
, where you replace [my unique id]
with the Unique ID that you gave the field when you created it with s2Member. Please be advised that searching Custom Registration/Profile Fields may result in a slower DB query; i.e., at this time is not recommended on sites with more than 25,000 users.
You can, however, limit the search to specific s2Member User Roles using the roles
attribute:
roles
Optional. This can be a comma-delimited list of Role IDs (or a single Role ID); e.g., subscriber, s2member_level1, s2member_level2, author, contributor
, etc. The default is to include all users. Note: Ordinarily this is set to just one specific Role; i.e., when you want to list users that have a specific Role. However, it is also possible to provide a comma-delimited list of Roles and set rlc_satisfy="ANY"
(details below). For instance, if you set roles="subscriber,s2member_level1" rlc_satisfy="ANY"
you will list users with a Role of either subscriber
or s2member_level1
.
I hope this helps.