WordPress.org

Ready to get started?Download WordPress

Forums

do_action and errors (2 posts)

  1. andrewpeacock
    Member
    Posted 5 years ago #

    Hi,
    I'm trying to write an plugin which does some processing during the register_post hook, and which returns some errors back to the core register_new_user() function in wp-login.php

    register_new_user() does this:

    do_action('register_post', $user_login, $user_email, $errors);
    
    $errors = apply_filters( 'registration_errors', $errors );
    
    if ( $errors->get_error_code() )
    	return $errors;

    But in my plugin, I can't find any way to get a reference to the $errors, add new ones, and pass it back to register_new_user()

    I've tried all sorts of methods (and probably missed the very simple one that I need).

    Can anyone help please?

    Regards,
    Andy

  2. Mark Barnes
    Member
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic