Support » Plugin: Ban Hammer » Only works for wordpress-own registrations

  • May do what it says, but it only seems to work with registrations via the wordpress core registration process. If the registration is done via a plugin (I use UtlimateMember), it does not work.

Viewing 1 replies (of 1 total)
  • Plugin Author Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    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. 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 – for an example – I made a guess about what the $args are, and you may need to change those.

Viewing 1 replies (of 1 total)
  • The topic ‘Only works for wordpress-own registrations’ is closed to new replies.