Accounts module - adding new users
Hello
I am confused about some of the code in the Accounts module about how to create a new User.
The data tier has a class called User with a method called Create. This method calls a stored procedure that inserts a user into the database. The method catches any sql exceptions thrown by calling the stored procedure and sees if they have error number 2601 which is 'cannot insert duplicate key row.'
I dont understand how the stored procedure could ever generate this error because the primary key for the users table is an autonumber field.
Please can you explain where this error could be generated. I thought there might be a unique constraint on the email field perhaps but I couldn't see one.
Thanks a lot
andrea
|