Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - User groups in users table instead
#1

[eluser]Herlevsen[/eluser]
Hi. I would like to know if anyone else has tryed moving the user group from the users_groups table into the users table. I only want a user to be able to belong to one group, so i see no need to store it in a seperate table.

So if someone has tryed, i would like to know if you had any complications, and if you can remember how much you had to change.
#2

[eluser]TheFuzzy0ne[/eluser]
OK, so you only want to have users in a single category, but Ion Auth still supports the ability to put a user into multiple groups. Because of this, I really wouldn't go to the trouble of changing the database structure, as it will result in you having to rewrite code, and will probably introduce bugs into the code.

In short, leave it be. It's not doing anyone any harm. Smile
#3

[eluser]Herlevsen[/eluser]
Yeah, but the the thing is i have a site with alot of querys per page, and i am loading the group, along with some columns from the users table on every pageload. So in order to not have to do a join, and cut even more down on performance, i would like to just have it in the users table.

My own thought, was that it would probably only affect methods like in_group, create group and so on, and that the changes probably wouldn't be that bad.
#4

[eluser]TheFuzzy0ne[/eluser]
Are you noticing any performance issues? Don't get me wrong, I'm all for performance optimisation, but if your tables are indexed correctly, I doubt that extra join will cost you much more than 0.01 seconds.

The main reason I'm so reluctant to change any code, is for the same reason that we frown upon editing files in the ./system directory. If you ever decide to upgrade the library (perhaps for a new fature, or a bug fix), it makes it quite difficult.

Perhaps database caching would give you the performance boost you're looking for?




Theme © iAndrew 2016 - Forum software by © MyBB