stuttter / wp-user-groups

Group users together with taxonomies & terms
https://wordpress.org/plugins/wp-user-groups/
GNU General Public License v2.0
48 stars 22 forks source link

Capability check prevents use in non-authenticated contexts #20

Closed chrisvanpatten closed 6 years ago

chrisvanpatten commented 6 years ago

The capability check inside wp_set_terms_for_user prevents you from using the function in a non-authenticated context, such as inside a cron event.

I think this function should actually be split into wp_bulk_set_terms_for_user which provides the specific bulk functionality, and wp_set_terms_for_user which is a simpler wrapper around wp_*_object_terms.

This would also make it easier to solve #19 and possibly #18 too.

JJJ commented 6 years ago

21 is merged, so this is taken care of. Thanks @chrisvanpatten!