1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accessing username in setCustomFields()

Discussion in 'XenForo Development Discussions' started by UltimateMinecraft, Jan 9, 2014.

  1. UltimateMinecraft

    UltimateMinecraft New Member

    Trying to validate a custom field at registration. By looking at the code, setCustomField() appears to be where this field is validated (correct me if I'm wrong)

    Now whether or not the input is valid depends on the username, this is also why I don't use a PHP callback for this. Is there a way I can access the username from this function?

  2. Chris D

    Chris D XenForo Developer Staff Member

  3. UltimateMinecraft

    UltimateMinecraft New Member

    Thanks for the suggestion, does not work though ($this->get('username') was not set).
    The validation occurs at the registration form, so the user hasn't signed up yet.
    Last edited: Jan 10, 2014

Share This Page