Fill custom field from social network?


We have custom field for full name on php 3.1.6 board which is mandatory during registration. Is there a way to fill this field using information from social network? if yes, can I get some instructions how to do it? Thank you.


  • Hi,
    It is possible, but not simple.

    Registration through social login will call the user_add PhpBB function, which triggers a standard event (core.user_add_modify_data) that lets anyone modify/add user fields, including custom fields.
    So, you could add a listener to that event and fill in the custom field there.
    The only current limitation is that only a few social profile fields are available at this point.
    We could make changes to our plugin to accommodate for this though (by passing all social profile information to this standard event).

    Another way, is to edit (hack?) the plugin code so that the custom field is built (from all the social profile data) just before the user is added to PhpBB.
    This is simpler, but a hack, and changes the code to your needs (problem when upgrading the plugin).

    Hope this helps.
  • reconreconMember
    edited February 2016
    So what if someone has no idea how to implement something like this?
    I'm actually using the extension just for the Steam login and would like to be able to save their SteamID.

    Another question:
    What about e-mail adresses? Can they be read as well?
  • Hi,
    Steam does not share email addresses, so we do not have this info. (however, you can request the user to provide it at Social Login registration).

    Pre-populating custom fields with values from the social network profile is not easily available at this point.
    We could think of a way to allow site administrators to define such mapping though.
    This would be a nice feature indeed. We're adding it to our todo list.
  • Hi,

    There is a new version (2.4.11) that will allow you to populate your custom fields from social profile data.

    Igor, you should have received an email, with some instructions, for you to test.
    The setup is maybe complicated, but that is because the code is likely to be quite specific.
    In a nutshell: we now have a custom event, that allows user fields and custom fields to be modified or added, right before registration.
    This event can also be used by other extensions.

    If this can work for you, then, we'll release it, and document as much as possible.

    Recon, once this seems to work, we can help you with the SteamID custom field.

    Thanks for your help.
  • Didn't know that option exists. Thanks for the information.

    I'm available for testing as the custom field feature as well
  • Hi,
    Sure. We'll send the proposed version, with some instructions on how to store the SteamID.
    This version is not distributed yet (present on github though).

  • Frederic,

    I received your email and I sent you reply.
  • Hi,
    Yes, thank you!
  • Hi Recon,
    We've send you an email with some instructions on how to get the new version running.
    Let us know how this works.

  • Hello,

    I recently have begun using this phpbb extension and was wondering if there is documentation located soemwhere that could clarify exactly how i would capture a users SteamID as mentioned above. I am developing another web application that needs this information. I can see the example in the listener.php but i feel like im missing some context to how data is stored and passed for this example.

    Thank you.


Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.