Adding fields to Kentico User table

Yasmin Saad asked on November 28, 2017 18:29

Hey Guys, I would Like to ask about adding a new information to a user he must fill during registration. What is the best practice, adding those fields directly to User table or create my user table in another database with my custom fields then connect the two User tables with an Id ? Thanks Yasmeen

Correct Answer

Zach Perry answered on November 28, 2017 18:41

Add the fields to the usersettings.

Don't add the fields directly in the database. Go to Modules > membership > Classes > User - Settings > Fields and add them there.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Peter Mogilnitski answered on November 28, 2017 19:25 (last edited on November 28, 2017 20:44)

Why not to go directly to Modules > membership > Classes > User > Fields ?

1 votesVote for this answer Mark as a Correct answer

Yasmin Saad answered on November 28, 2017 22:12

Thanks guys for your answers :) . But if i added them through the fields it will add the fields directly to Database ? and if i have a foreign key to another table what should I do ?

0 votesVote for this answer Mark as a Correct answer

Daniel Maley answered on November 28, 2017 23:14

Hi Yasmin, yes modifying the membership module as described by others will add a new field to the CMS_User table. Laura Frese has a great blog post on doing this here. In regards to making this new field a foreign key I would do this manually through SQL scripts after modifying the user class.

1 votesVote for this answer Mark as a Correct answer

Yasmin Saad answered on November 29, 2017 02:15

Thanks Daniel

0 votesVote for this answer Mark as a Correct answer

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