Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save greathmaster/cdfe801e526f43f4d71f3cc4c5ddf735 to your computer and use it in GitHub Desktop.
Save greathmaster/cdfe801e526f43f4d71f3cc4c5ddf735 to your computer and use it in GitHub Desktop.
Set flag to hide members from the directory upon new user creation by an admin
/*Set flag to hide members from the directory upon new user creation by an admin*/
function pmpromd_set_visibility_to_hidden_edit_user_created_user ($user_id, $notify)
{
update_user_meta( $user_id, 'pmpromd_hide_directory', true );
}
add_action('edit_user_created_user', 'pmpromd_set_visibility_to_hidden_edit_user_created_user', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment