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

Referencing CustomFields of Logged in Users via PHP Callbacks

Discussion in 'XenForo Development Discussions' started by Dan Hawkins, Mar 11, 2016.

  1. Dan Hawkins

    Dan Hawkins Active Member

    Hi All,

    We're trying to display our "system status" - we have custom fields which contain customer database names.... We are trying to show the status dependant on what server (defined via database name) the client is on...

    The hard part (or the part I don't know how to do) is to obtain data about the user who is currently logged in XenForo (their database name or sagecode *both of these are custom fields*) and make it available to the external PHP script...

    Would that be possible and how can this be done

    Any help would be greatly appreciated!


  2. Dan Hawkins

    Dan Hawkins Active Member

    If it can do something like load a URL with a parameter in, that will be fine. E,g, "https://someurl.somesite.com/SomePage.php?SomeParameter=<customersDBNameHere>". Would be even better if it could send a post request to the page instead. That way the sensitive parameter wouldn't be in the URL. Ideally, when the user loads the page- It should contact my external PHP file informing it which customer is logged in so it can return the right data. This all needs to happen server side.

Share This Page