intersynergy-login-plugin.php
/**
     * Validates and then completes the new user signup process if all went well.
     *
     * @param string $email      The new user's email address
     * @param string $first_name The new user's first name
     * @param string $last_name  The new user's last name
     *
     * @return int|WP_Error The id of the user that was created, or error if failed.
     */
Validates and then completes the new user signup process if all went well.
@param string $email      The new user's email address
@param string $first_name The new user's first name
@param string $last_name  The new user's last name

@return int|WP_Error The id of the user that was created, or error if failed.
Validates and then completes the new user signup process if all went well . @param string $email The new user ' s email address @param string $first_name The new user ' s first name @param string $last_name The new user ' s last name @return int|WP_Error The id of the user that was created or error if failed .
private function register_user($email, $first_name, $last_name)
    {
        $errors = new WP_Error();
        if (! is_email($email)) {
            $errors->add('email', $this->get_error_message('email'));
            return $errors;
        }
        if (username_exists($email) || email_exists($email)) {
            $errors->add('email_exists', $this->get_error_message('email_exists'));
            return $errors;
        }
        $password = wp_generate_password(12, false);
        $user_data = array(
            'user_login'    => $email,
            'user_email'    => $email,
            'user_pass'     => @$password,
            'first_name'    => @$first_name,
            'last_name'     => @$last_name,
            'nickname'      => @$first_name,
        );
        $user_id = wp_insert_user($user_data);
        wp_new_user_notification($user_id, $password);
        return $user_id;
    }
private function register_user ( $ email , $ first_name , $ last_name ) { $ errors = new WP_Error ( ) ; if ( ! is_email ( $ email ) ) { $ errors -> add ( 'email' , $ this -> get_error_message ( 'email' ) ) ; return $ errors ; } if ( username_exists ( $ email ) || email_exists ( $ email ) ) { $ errors -> add ( 'email_exists' , $ this -> get_error_message ( 'email_exists' ) ) ; return $ errors ; } $ password = wp_generate_password ( 12 , false ) ; $ user_data = array ( 'user_login' => $ email , 'user_email' => $ email , 'user_pass' => @ $ password , 'first_name' => @ $ first_name , 'last_name' => @ $ last_name , 'nickname' => @ $ first_name , ) ; $ user_id = wp_insert_user ( $ user_data ) ; wp_new_user_notification ( $ user_id , $ password ) ; return $ user_id ; }
Validates and then completes the new user signup process if all went well.
Validates and then completes the new user signup process if all went well .
// Email address is used as both username and email. It is also the only // parameter we need to validate // Generate the password so that the subscriber will have to check email...