• Hello

    First I want to say, thanks for that plugin that’s really useful.
    It works great when you enforce users to have an email address. However wordpress allows to create user without a email using wp_create_user.

    What happens in that case is that the hack_pre_user_email filter is called with $email having the value ”. Then since ” is not an email adress the filter return null which isn’t a valid value for wp_create_user and causes the creation to fail.

    For now, I’ll make a quick patch to make it work on my wordpress, but I bring this issue here in order to see if that case should be handled by the plugin and if yes in what way ?

    Thanks for reading this,
    Nelson

Viewing 2 replies - 1 through 2 (of 2 total)
  • @ngoncalves – Hi, I also need to handle email not present. Can you post your patch here?

    Thread Starter ngoncalves

    (@ngoncalves)

    What I ended up doing is editing the allow-multiple-accounts.php file and adding this check to the hack_pre_user_email function (l:269).

    
    if ( isset($email) && empty( $email ) ) {
        return $email;
    }
    

    Not the best way to do it, but in my case it works as intended.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Create User with an empty email address’ is closed to new replies.