Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • @crazyboy

    Participant

    hellooo….

    @crazyboy

    Participant

    some answers please

    @crazyboy

    Participant

    anybody here?

    @crazyboy

    Participant

    I want to use it as referral link 🙂

    @crazyboy

    Participant

    not working 🙁

    @crazyboy

    Participant

    someone help me please

    @crazyboy

    Participant

    how about to validate field with format:
    Uxxxxxxx (xxxxxxx is number)
    ex: U1234567

    @crazyboy

    Participant

    thanks
    here is the code on functions.php

    function validate_referrer()
    {
      global $bp;
      global $wpdb;
      $referrer = $_POST['field_3'];
      $members = $wpdb->get_var("SELECT * FROM wp_users WHERE user_login = '$referrer'");
    
      if (!$members) {$bp->signup->errors['field_3'] = __('Please enter the correct referrer','buddypress');}
    }
    
    add_action('bp_signup_validate', 'validate_referrer');
Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar