Use a hook that fires later and add the $bp global to the function.
Try this:
function bp_password_beefing() {
global $bp;
if ( !empty( $_POST['signup_password'] ) )
if ( strlen( $_POST['signup_password'] ) < 6 )
$bp->signup->errors['signup_password'] = __( 'Your password needs to be at least 6 characters', 'buddypress' );
}
add_action( 'bp_signup_validate', 'bp_password_beefing');
Related Posts:
- How to modify an add_action() inside a loop of core function
- Can user_register output the password?
- Custom Front End Registration – How Does the Key work in the Password Set Request?
- Hook *after* user password change?
- Post-Registration, post-meta hook?
- How can I do customizations on login, registration and password recovery forms?
- update post meta using user_register hook not working
- How to hook into user registration process Before user registers
- add_action for lost_password or modify wp-login.php?action=lostpassword
- I don’t understand why I shoud use lostpassword_url hook?
- BuddyPress User Profile Menu
- How to hook in after user’s registration email has been sent?
- Which hook should I use to capture $_POST(‘password’) via profile update and password reset
- Change Password Confirmed Email Text
- register_activation_hook not updating
- How to change the default mail when admin approuved an user?
- Password minimum length in personal subscription [closed]
- hooks for automatic approve user registration according to data in custom fields
- What hooks do I need to hook into to capture ever wp_user creation/change?
- ‘user_register’ hook – need to distinguish if created from wp admin panel
- add_action doesn’t work for my function
- Updating user meta data from external link, user not logged in
- add extra parameter in default hook in wordpress
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- Problem in register activation hook and Copying folder
- The acction hook stop working if i move it from plugin file to theme’s functions.php file
- Does wp_login hook fire on user registration?
- Change password reqts with NO plugin without breaking resetpass link?
- Disable user registration password email
- How many times can I hook into the same action?
- Is there a hook before the user is authenticated?
- WordPress auto login after registration not working
- switch_to_blog(): Load textdomain
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- What is the action hook for save media-form on gallery tab?
- Check if action hook exists before adding actions to it
- Send reset password link to user from custom lost password form
- How to get the password and username of the add new user form (admin back end) in wordpress
- after login that will redirect user role into a page
- User defined password at registration – registration email sends auto generated pass
- Access post meta just after publishing
- how to create endpoint for downloading pdf files?
- hook to get (and change) the search string before processing
- Is there a recover_post hook to go with trash_post hook?
- How to override languages files in wp-content/languages/themes with child theme
- hooks & filters and variables
- changing the signup button url in WPMU/Buddypress
- How to check what kind of saving it is?
- Override wp_delete_post and move to trash instead for custom post type
- Problem with logging in WP users automatically
- Hook all http requests
- Setting Cookie with init hook causes ‘header already sent’
- Is there an “Add Page” hook?
- How To Make Sure That My Action Hook Executes Last
- Does update_comment_meta hook exists?
- Can not set custom title on some WordPress setups
- Checking post format during xmlrpc_publish_post
- Hook for when a page template is changed
- Footer.php being inserted before article closing tag?
- Get all posts with a duplicate name
- Save acf field data via acf/save_post before post is saved
- user_profile_update_errors hook not executing
- Above-the-fold inline styles from SASS generated stylesheet
- Redirect in form handler causing form to be submitted twice
- Checking login status before wp_get_current_user is initialised
- Add media library tab
- Conditional hook [closed]
- Add_menu_page() error message -> “You do not have sufficient permissions to access this page”
- Displaying list of cities according to the selected state. Using the WordPress hook
- Registration Hooks don’t appear to be working
- Removing parent theme action on pluggable function not working
- Removing a Filter
- Which action hook should I use to intercept a form upon submission?
- Would there be anything stopping me from removing both wp_head and wp_footer?
- Where Are Hooks?
- How to cancel an action hooked to untrash_post? or any hook
- WordPress plugin activation, deactivation and uninstall hook not being triggered
- How to stop WordPress from updating the post meta
- Can an RSS item be altered with a hook?
- Block Update Profile Errors
- Thickbox ‘tb_unload’ function being called twice
- How to remove a meta description or other contents
- Hooking save_post breaks check for term in added_term_relationship hook?
- Restrict editing of post type to list stored in user meta
- Delay action unltil the untill previous (hoocked) action is completed
- Rewrite the search page to use an appended slug + parameter
- What is the hook to remove a menu items group from Appearance > Menus column Add menu items
- Add stuff above header edit form
- do_action not working in loop
- Add HTML code before the title of the Tag page
- WP_mail() Issue. Duplicate emails if $_GET[‘A’] == email
- Can add_image_size be added earlier
- Hook to change Author Info
- Query author’s posts & posts that have author’s id as meta value
- admin_post hook not working
- How to display before H1 Title
- What is the equivalent hook for both admin_head() and wp_head() combined, if any?
- Search WordPress Hook for completed Elementor Update
- How to filter the URL of thumbnail size in the Media Grid and admin pages