Skip to:
Content

BuddyPress.org

Ticket #8066: 8066.diff

File 8066.diff, 819 bytes (added by tharsheblows, 5 years ago)

filters to be used in server side validation of password

  • src/bp-settings/actions/general.php

    diff --git a/src/bp-settings/actions/general.php b/src/bp-settings/actions/general.php
    index 62a6c9e9c..0dbd5bbc8 100644
    a b function bp_settings_action_general() { 
    158158                        $pass_error = 'empty';
    159159                }
    160160
     161                $pass_error = apply_filters( 'bp_validate_password', $pass_error );
     162
    161163                // The structure of the $update_user object changed in WP 3.3, but
    162164                // wp_update_user() still expects the old format.
    163165                if ( isset( $update_user->data ) && is_object( $update_user->data ) ) {
    function bp_settings_action_general() { 
    235237                }
    236238        }
    237239
     240        $feedback = apply_filters( 'bp_settings_feedback', $feedback, $feedback_type );
     241
    238242        // Set the feedback.
    239243        bp_core_add_message( implode( "\n", $feedback ), $feedback_type );
    240244