XF 2.2 How to properly update User structure?

Hey there, I have been searching for awhile perhaps too long with the lack of sleep. However I was hoping someone could atleast point me in the right direction.

I am encountering an issue when attempting to extend the User entity with a new relationship and column. The relationship and column are callable directly, however they don't seem to populate {{ dump($user) }} relationship row, or values. Is this due to an improper setup between the relationship and entity, or just how the data is served naturally? Want to be sure I am going about this the correct way.
 
Some days ago we have talked about, that such relationships have to be defined.
You may look for full/width/full width?

I guess that a query for xf_user will be always

select * from xf_user

and only if you define it, there will be JOINS with the related tables like

select * from xf_user
LEFT JOIN whatever_table ON xf_user.user_id=whatever_table.user_id
 
I am encountering an issue when attempting to extend the User entity with a new relationship and column
Have you tried the following -> https://xenforo.com/docs/dev/lets-build-an-add-on/#extending-the-forum-entity

So far we've added a column to the xf_forum table, it's now time to extend the Forum entity structure. We need to do this so that the entity knows about our new column, and so that data can be read from and written to it via the entity

It uses the Forum entity as an example but you can use that as reference for the User entity as well.
 
Top Bottom