Skip to content

Instantly share code, notes, and snippets.

@ultimatemember
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ultimatemember/873ae0013a15228abb70 to your computer and use it in GitHub Desktop.
Save ultimatemember/873ae0013a15228abb70 to your computer and use it in GitHub Desktop.
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