Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:25
What would you like to do?
Run a specific action whenever community role is updated
add_action('um_after_user_role_is_updated', 'mycustom_role_change_action', 10, 2 );
function mycustom_role_change_action( $user_id, $new_role ) {
if ( $new_role == 'admin' ) {
die('You can not be a community admin');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment