Support » Plugins » Hacks » Validating Custom Profile Fields During Registration

  • Resolved floatingpointmatt


    Hey everybody,

    A quick question about validating custom profile fields during the registration process…

    I’ve got fields showing, and in theory capturing based on the code at:

    Validation on register_post didn’t seem to work though, so I followed through the Codex to registration_errors…

    Now I am able to interact with errors (which weren’t available during register_post), but trying to register throws the following error:

    PHP Fatal error: Call to a member function get_error_code() on a non-object in …\wp-login.php on line 316

    Trying to trace that error shows that it happens often with plugins that interact with registration (apparently Sabre is high on the list), but I get nothing in terms of a recommended fix.

    NOTE: I get the error whether I send things through empty (i.e. all errors on required fields) or completely filled in.

    I’ve confirmed I have a WP_Error object through the body of my validation function, and a print_r indicates all should be fine from start to finish (with a few errors getting added if appropriate) but it seems like the WP_Error object is getting mangled by the time it returns to wp-login.php…

    Has anybody seen anything on successfully adding and validating profile fields for WordPress 3.3.x and up?

    NOTE: I’d upgrade to 3.4.x but I’d rather fight this battle, then worry about plugin compatibilities, etc.

    ADDITIONAL: I’m also doing this for a stronger integration with the admin than a plugin like WP-Members offers (which works, but works differently… and undesirably so).

    Any assistance would be greatly appreciated!



Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Validating Custom Profile Fields During Registration’ is closed to new replies.