Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5379 closed enhancement (fixed)

add earlier hook in bp_core_screen_signup() *before* validation checks

Reported by: terraling's profile terraling Owned by: boonebgorges's profile boonebgorges
Milestone: 2.0 Priority: normal
Severity: normal Version:
Component: Core Keywords:


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)

bp-members-screens.php (19.7 KB) - added by terraling 10 years ago.

Download all attachments as: .zip

Change History (4)

#1 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.0

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!

#2 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7824:

Add bp_signup_pre_validate hook

Allows plugins to modify signups before validation takes place.

Fixes #5379

Props terraling

#3 @terraling
10 years ago

That was quick, thanks!

I somehow missed the chance to filter 'bp_core_validate_user_signup', but adding a specific action hook is more explicit.

Note: See TracTickets for help on using tickets.