Adding non-XenForo data to User Model

Hardcore

Active member
Quick question. We've got a single non-XenForo table that contains user stats used on non-XenForo pages. We'd like to pull the stats into XenForo for easy use/better integration.

I've been looking at the Model/User.php file, but before I start hacking at the code I was wondering if anyone had an easy way of accomplishing this?

Thanks in advance ...
 
If there's a primary key that associates each record in the non-XF table to the xf_user record, then just create a new Model and do whatever you please.
 
If there's a primary key that associates each record in the non-XF table to the xf_user record, then just create a new Model and do whatever you please.

Yeah. I simply added an additional $selectFields & $joinTables to the prepareUserFetchOptions function in Model/User.php. Works great, and I can easily add others based on my needs.

I'll most likely need to adjust the getVisitingGuestUser function too, but that's just as straight forward.

Thanks.
 
Back
Top Bottom