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

Extra user data possibilities

Discussion in 'XenForo Development Discussions' started by LennardF1989, Aug 2, 2013.

  1. LennardF1989

    LennardF1989 Member

    I'm nearing completion of a XenForo forum I've been working on, but there is one last thing in the way before I can deliver it.

    Currently I make use of an External API to keep the forum accounts up to date regarding e-mail, username, forum groups, banned status, etcetera. For this to work properly I have some additional read-only data to assign to an user (for example an userId used by the external API).

    I have been thinking about adding extra hidden uneditable user fields and store all data I might need in there, but that sounds a tad hackish. Are there any other ways? Perhaps through the authentication data or can I extend the User model and add extra database fields easily? I'm looking for the most clean solution, not particulary the easiest.

    Any kind of tip or thought is welcomed!
  2. LennardF1989

    LennardF1989 Member

    None ever tried doing something similar?
  3. AndyB

    AndyB Well-Known Member

    I prefer storing information like you mentioned in a separate database. That way the xenforo database is completely stock without any additional tables or table modifications.
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    I have used user fields for necessary data storage before, and is quite easy to implement using the necessary DataWriters.

Share This Page