#5379 closed enhancement (fixed)
add earlier hook in bp_core_screen_signup() *before* validation checks
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
There is an existing action hook called bp_signup_validate in bp_core_screen_signup() which comes *after* all of the WP and BP validation checks.
Can we please insert
do_action( 'bp_signup_prevalidate' );
in bp_core_screen_signup() at line 82 of bp-member-screens.php to allow intervention *before* the validation checks?
(My use case is to improve the mobile experience by making it possible to bypass requiring the user to enter the password twice. Leaving #submit_password_confirm hidden and empty on the client also makes for a nice honeypot.)
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
If you want to modify the signup validation that BuddyPress does, I'd recommend filtering 'bp_core_validate_user_signup', and setting/unsetting error messages. With the hook you've requested, I imagine you'd have to do something kinda hackish (like messing with the $_POST global) to work around our validation.
That said, there are legit reasons for wanting this hook, and it's harmless to add it. I'm going to tweak the name to fit better with our naming conventions. Thanks for the suggestion!