Last active
August 29, 2015 14:25
-
-
Save ultimatemember/873ae0013a15228abb70 to your computer and use it in GitHub Desktop.
Run a specific action whenever community role is updated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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