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?
- Prefix user login_name and validate it is unique on Registration
- Is there a way to send HTML formatted emails with WordPress’ wp_mail() function?
- How to get WordPress’ hooks/actions run sequence?
- Where can I find a list of WordPress hooks?
- Is there a save_post hook for custom post types?
- Where is the right place to register/enqueue scripts & styles
- How to know what functions are hooked to an action/filter?
- How to hook update_post_meta and delete_post_meta?
- Are there any hooks that alter the 404 logic?
- Is there a hook that runs after a user logs in?
- Difference between do_action and add_action
- WP Cron Doesn’t Execute When Time Elapses
- WooCommerce: change display order of product short description and price [closed]
- Why do some hooks not work inside class context?
- Difference between after_setup_theme and init action hooks?
- get $post in init filter or action?
- Disable user registration password email
- Use wp init hook to call other hooks?
- How many times can I hook into the same action?
- How do I implement the WordPress Iris picker into my plugin on the front-end?
- How to intercept a 404 error
- Move excerpt meta box to above content editor
- Action hook for custom tax edit
- Trigger custom action when setting button pressed
- What is “all” in isset($wp_filter[‘all’])
- Whats worth using add_action when we can simply use add_filter?
- Is there a limit to hook priority?
- Please explain how these hooks work
- Add_action to wp_head via functions.php
- Hook after image is uploaded and image sizes generated
- How do I create a password reset link?
- Is there a hook before the user is authenticated?
- Hook that fires when admin setting is saved
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- WordPress auto login after registration not working
- What is the difference between update_post_meta and update_postmeta hooks?
- Hook ‘wp_enqueue_scripts’ priority has no effect
- Hook on trash post
- Auto-retrieve YouTube Image for Thumbnail?
- Which hook if user profile information is updated?
- How to remove action hook done in a plugin from functions.php in my theme?
- Hooks for trashing, deleting, saving, restoring custom post type
- Is there a WordPress core & plugins update action hook?
- Hook into WordPress update?
- trigger save_post event programmatically
- Implementing advanced add_* function wrappers
- Adding onload to body
- How to let user set password on registration
- My add_action (wp_footer, ‘method’) is not calling?
- Do WordPress Core Filenames Work as Hooks?
- What is the earliest possible hook for safely using `is_front_page`?
- switch_to_blog(): Load textdomain
- BuddyPress: Allow only one email domain to register
- How to call a REST endpoint when a post is published?
- __NAMESPACE__ with register_activation_hook
- Can I hook inside another hook?
- Adding function directly vs using hook in function.php
- Are hooks called synchronously?
- How to check if which hook triggered the call to a function?
- How can I send to multiple Contact Form 7 recipients based on form input? [closed]
- Hook into wp_head(); in a plugin
- Send data to 3rd party api with wp_remote_post on wp_login
- is it possible to get the hook name in add_action?
- Hook for URL Request
- Why do generated passwords start/end with spaces?
- How do I flush the rules after saving settings using the Settings API?
- Run javascript code after wp_login hook?
- Does anyone have a visual breakdown of core hooks and when they are fired?
- How to customize the WP admin default help contents
- What is the action hook for save media-form on gallery tab?
- What hook is executed just after wp_query has been executed?
- Hide gutenberg option blocks