Skip to:
Content
Pages
Categories
Search
Top
Bottom

retrieving xprofile fields during registration validation


  • lcdservices
    Participant

    @lcdservices

    I need to implement some custom validation during the signup process, using a BP form with XProfile fields. I’m doing so with the “bp_signup_validate” action. In my callback, I can access the global $bp variable to get the username and email used during signup. But custom XProfile fields are not available.

    Is there any other way I can retrieve that data during the validation process? The user account is not yet created, so I can’t use xprofile_get_field_data yet (AFAIK).

Viewing 3 replies - 1 through 3 (of 3 total)

  • Henry Wright
    Moderator

    @henrywright

    The $_POST variable should have what you need.


    lcdservices
    Participant

    @lcdservices

    Ok, that’s actually what I ended up doing shortly after posting this. It just feels like that should be part of a passed or available object rather than the raw $_POST so it’s gone through any form validations. But if that’s the only way it’s available, I’ll work with it.


    Henry Wright
    Moderator

    @henrywright

    It just feels like that should be part of a passed or available object rather than the raw $_POST so it’s gone through any form validations

    At the point bp_signup_validate executes we’re still very early on in the process (still validating the data). Setting object properties or saving to the database only happens after the validation checks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar