• Resolved metropolis_john

    (@metropolis_john)


    I’ve come across a problem when using this plugin with custom registration form validation. The issue is that the create_new_user() function is called on the ‘register_post’ hook. This action hook fires before the ‘registration_errors’ hook, which is when WordPress Docs instruct custom validation should be called. In fact, they go so far as to say never to call custom validation on ‘register_post’.

    register_post
    registration_errors

    Currently, when a user registers, as long as the default validation (on username and email fields) passes, the create_new_user() function is called, then the ‘registration_errors’ hook fires and returns those custom validation errors.

    The custom validation works perfectly without this plugin, so obviously WP core functionality is creating the user after ‘registration_errors’. Any thoughts on getting around this?

    https://ww.wp.xz.cn/plugins/new-user-approve/

Viewing 1 replies (of 1 total)
  • You make good points here. This is how the plugin was originally coded. I ended up changing it because many users were having issues. But I’m going to change it back and let WordPress do what it is supposed to do.

Viewing 1 replies (of 1 total)

The topic ‘Problems with custom registration validation’ is closed to new replies.