account verification (database question) (1 Viewer)

amrick

New member
Local time
Today, 00:30
Joined
Dec 28, 2007
Messages
6
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

Registered User.
Local time
Today, 00:30
Joined
Jun 2, 2002
Messages
3,433
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

New member
Local time
Today, 00:30
Joined
Dec 28, 2007
Messages
6
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!
 

Users who are viewing this thread

Top Bottom