BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18100

    Here are the screenshots of the fields in ultimate member if you want to add support for it at some point: https://docs.google.com/document/d/1t-gHlByQc6_AyCVEZ0V3UT3oNrxQuzj6m-bphymGXaw/edit?usp=sharing

  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18099

    I figured it out! Ultimate member allows you to use a field for user name or email as well as the standard fields user name and email fields. That is what I am using because we want the username to be the same as the email address. So in your code I replaced email with username and it worked:

    	public function ban_um( $args ) {
    		$email = isset( $args['username'] ) ? trim( $args['username'] ) : '';
    
    		if ( empty( $email ) ) {
    			return ;
    		}
    
    		if ( ! $this->is_allowed( $email ) ) {
    			UM()->form()->add_error( 'username', $this->settings->get_error_message() );
    		}
    	} 
  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18097

    I put in a list of emails that I wanted to be allowed to register. Anybody else I want to block. I entered one address per line without commas using lowercase letters.

  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18095

    Thank you. I really appreciate it.

  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18093

    Version 2.0.29 | By Ultimate Member

  • Participant
    Level: Initiated
    Posts: 8
    Diane Conrad on #18090

    Correct – it is not restricting user registration for ultimate member. Should have written: However, after properly entering the email addresses under settings it is NOT restricting registration to those emails.

    • This reply was modified 5 years, 6 months ago by Diane Conrad.