View Full Version : account verification (database question)


amrick
12-28-2007, 07:47 AM
Hi all,

I have a system where users can register, but must verify their email addresses by clicking on a confirmation link sent to their email.

I currently have the database set up as follows

tbl_temp_members (confirmcode, firstname, lastname... etc)
tbl_reg_members (userid, firstname etc etc)

Once signed up, the details are entered into temp members
tbl_temp_members --> then copied into tbl_reg_members once account is confirmed.

My question is, is this the best/most common way for account creation & confirmation. Would it be advised to just have 1 table consisting of all accounts, with a field called "confirmed" set to yes/no accordingly?

dan-cat
01-10-2008, 01:08 PM
Hi all,

I have a system where users can register, but must verify their email addresses by clicking on a confirmation link sent to their email.

I currently have the database set up as follows

tbl_temp_members (confirmcode, firstname, lastname... etc)
tbl_reg_members (userid, firstname etc etc)

Once signed up, the details are entered into temp members
tbl_temp_members --> then copied into tbl_reg_members once account is confirmed.

My question is, is this the best/most common way for account creation & confirmation. Would it be advised to just have 1 table consisting of all accounts, with a field called "confirmed" set to yes/no accordingly?

I use a single table with an Activation bit field (SQL Server) which is marked as true when the account is activated.

I do this because I don't want duplicate accounts with the same email address. My validation check on this is much simpler if I only have to check against one table for both unactivated and activated accounts. (ie I never have more than one account with the same email address regardless of its activation status)

amrick
01-10-2008, 02:09 PM
I use a single table with an Activation bit field (SQL Server) which is marked as true when the account is activated.

I do this because I don't want duplicate accounts with the same email address. My validation check on this is much simpler if I only have to check against one table for both unactivated and activated accounts. (ie I never have more than one account with the same email address regardless of its activation status)

Hi Dan,

thanks for your reply. I ended up going for the 2 table approach and settling for the long winded validation checks. (purely down to time constraints)

Your approach seems the more simpler and most obvious however!