Skip to content
Docs
Get RestroPress

Action

rpress_process_register_form

Updated
On this page

Fires after the built-in registration field checks, before the account is created.

Runs in rpress_process_register_form once the username, email and password checks have recorded their errors. If no errors are recorded after this action, the user is registered and logged in. Add your own validation here and call rpress_set_error to block the registration. It takes no arguments.

Example#

function my_require_terms() {
	if ( empty( $_POST['my_accept_terms'] ) ) {
		rpress_set_error( 'my_terms', __( 'You must accept the terms.', 'my-plugin' ) );
	}
}
add_action( 'rpress_process_register_form', 'my_require_terms' );

Source#

Fired from:

  • includes/login-register.php (line 145), in rpress_process_register_form()

See also#

Was this page helpful?