dre1080 / warden

More than just a user database auth package for FuelPHP
http://dre1080.github.com/warden
MIT License
46 stars 11 forks source link

Support for user profiles #8

Closed rclanan closed 13 years ago

rclanan commented 13 years ago

Add support for user profiles.

dre1080 commented 13 years ago

would this be a text column in the users table or rather a new related profiles table?

rclanan commented 13 years ago

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.

dre1080 commented 13 years ago

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?

rclanan commented 13 years ago

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.

dre1080 commented 13 years ago

What should one be able to set in the config for this? Are default fields needed?

rclanan commented 13 years ago

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.

rclanan commented 13 years ago

Very nice! Thanks..