I should clarify in the readme that, yes, it only works via core WP registration since it can’t magically know all the various plugins, but! It is hook-able! That means if UltimateMember allows for hooks into the registration process, then you should be able to use this.
https://docs.ultimatemember.com/article/1278-umsubmitformerrorshookregistration suggests that’s possible… This code is 100% NOT tested:
add_action( 'um_submit_form_errors_hook__registration', 'my_submit_form_errors_registration', 10, 1 );
function my_submit_form_errors_registration( $args ) {
global $ultimatemember;
$form['errors'] = new WP_Error();
$BanHammer = new BanHammer();
if ( $BanHammer->banhammer_drop( $args['user_name'], $args['user_email'], $form['errors'] ) )
{
$ultimatemember->classes['form']->add_error( 'user_email', 'You must register with a valid email address.' );
}
}
You want some variation of Gravity Forms – https://github.com/Ipstenu/ban-hammer/wiki#gravity-forms for an example – I made a guess about what the $args are, and you may need to change those.