User table's custom field usage

Yang Wen asked on January 28, 2016 20:01

For our site, there are various features that the user may opt in. Currently we're using custom field extensions to the users table to store the flag values of these user-specific settings.

Is this the best usage of the custom fields? Should we create a custom table to store our custom profile data? I'm concerned with future Kentico upgrades that may blow away our custom fields.

What is your solution for custom profile data storage? Thanks

Correct Answer

Brenden Kehren answered on January 28, 2016 20:10

These additions are upgradable as long as you are using the Kentico UI to do so. In fact this is how it was designed. There are some considerations you need to look into, if you ever have a need to have a single user authenticate against different sites or sections within the site which have different properties. In this case you might want a custom table with a FK relationship back to the Users ID/GUID and store their preferences in the custom table.

If you don't anticipate that need or any other scenario in which you might need to have more than one set of user preferences, then you should be ok leaving them as additions to the user.

1 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.