Additional signup validation filter not working with TML
-
Hello Jeff,
This is not the TML issue, I am just having troubles making additional wpmu_validate_user_signup filter to work with Theme My Login. I am doing this through a separate plugin and I was hoping you might prompt me what can be wrong here.
In my custom plugin, I added filter with highest priority as:
add_filter('wpmu_validate_user_signup', 'check_contact', 1, 3)
If validation fails, a new error is added to the $result[‘errors’] array like:
$result['errors']->add('no_contact', 'Sorry you cannot be registered');
I also added error message to the ms-signup-user-form.php
<?php if ( $errmsg = $errors->get_error_message( 'no_contact' ) ) { ?> <?php echo $errmsg; ?> <?php } ?>
I assumed that since my validation filter runs first, TML will receive the $result[‘errors’] with my custom error assigned (if any) and will block the registration. However, my filter never works.
Would you have any idea why TML not picking up additional validation? Thanks!
- The topic ‘Additional signup validation filter not working with TML’ is closed to new replies.