Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Remove ForumUsers table #326

Open
Kaik opened this issue Oct 21, 2017 · 2 comments
Open

Remove ForumUsers table #326

Kaik opened this issue Oct 21, 2017 · 2 comments

Comments

@Kaik
Copy link
Contributor

Kaik commented Oct 21, 2017

Dizkus since the beginning have separate users table which is nothing more than a Zikula users "duplicate" (one to one relation) - all users in the forum_users table are Zikula users but not all Zikula users are in forum users table - only those users that interacted with the forum are in forum users table. I think it exists due to historical reasons because Dizkus was based on BBForum this table most probably came from BBForum or there was intention at the beginning to make forum standalone or something like that.
Currently, there is no reason to keep it unless someone will come up with a good one.
This will not be done before everything else work and both v5 and v6(master) will be released so not soon.

@craigh
Copy link
Member

craigh commented Oct 21, 2017

I remember wrestling with the same decision. You need some way to track all the information in the entity https://github.com/zikula-modules/DizkusModule/blob/master/Entity/ForumUserEntity.php So... you either use a related entity or user attributes which is essentially the same thing (a related entity). So - it seems like a lot of work for not much benefit

@Kaik
Copy link
Contributor Author

Kaik commented Oct 22, 2017

There is as well "proxy" class/service (I do not know if proxy is a good word for it) https://github.com/zikula-modules/DizkusModule/blob/master/Manager/ForumUserManager.php This class/service is used in most templates and I tried to use it everywhere it is intended to make entity more "smart" - it exists between controller/view and doctrine so controller can be thin it frees doctrine entities from using services and templates from repetitive logic. If implemented properly everywhere it might reduce the amount of work.
Another thing is that some pieces of information are stored in forum users entity and some like signature/avatar in user attributes which is another reason to remove forum users table completely.
On the other hand, back in the day when I was working on that part, I remember thinking that ForumUserEntity helps with something but now I have no idea what it was...hmm most probably relations https://github.com/zikula-modules/DizkusModule/blob/master/Entity/ForumUserEntity.php#L89

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants