How to correctly override a filter?

Try:

function allow_daniel_edit( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
    if ($user_id == 59) {
        return array( 'bp_moderate' );  
        // or some other permission or additional permissions
    }

    return $caps;
}
add_filter( 'map_meta_cap', 'allow_daniel_edit', 999, 4 );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)