Closed rclanan closed 13 years ago
would this be a text
column in the users
table or rather a new related profiles
table?
That's the way simpleauth does it currently. When I was looking at pyrocms I saw that Ion_auth used a separate profiles table. Personally, I like the separate table for profiles a little better as it's a little easier to follow then a serialized text field but it does add the extra overhead of the data being split between two different tables.
For optimum performance i think it would be better to keep data that is written heavily separated from data that is read heavy to ensure cache can work effectively. A separate table with a 1-1 relation would be best i think cause it would be possible to use indexes, and reduce data-redundancy eg. imagine having a search form and you're searching for a user with a firstname or fullname wanting to use a LIKE
condition, instead you'd have to go through and select all user fields, get user's text field, unserialize/json_decode and look if the name matches, and if there's none you'd go through every single user.. unless im missing something?
I see your point there and agree that a different table would probably be the best course of action unless there is something i am missing as well.
What should one be able to set in the config for this? Are default fields needed?
I can't think of any config values that would be needed unless you want the user id field to be configurable but that can be done with the relation using the ORM. The only default field would be the user id field in my option. All other fields would be optional as each profile in each system is different.
Very nice! Thanks..
Add support for user profiles.