Home : Products : Gossamer Forum : Development, Plugins and Globals :

Products: Gossamer Forum: Development, Plugins and Globals: Re: [Franco] Existing user ID for e-mail address check: Edit Log

Here is the list of edits for this post
Re: [Franco] Existing user ID for e-mail address check
I spent some time today looking at the code. If you use how user names are treated and tested for duplicates as your guide - the process should be simple. There does not appear to be an if/then series to rule out people from using the same user names. Rather, it is handled from the database. You will notice that the value for user_name is limited to unique values. By making the user_email field a unique variable, it will then limit users to haveing one account registered to any one e-mail address.


Now - I tried this, but found that if you have offenders already in the system - you can not use this method to fix the problem. The database will return an error with the first offender notifying you that there are duplicate entries in the db.

If you do not have offenders - you can do it, but when you enter this - here is the error message your user gets when they try to register with a dulpicate:

A fatal error has occurred:

Failed to execute query: 'INSERT INTO gforum_User (user_last_logon,user_title,user_password,user_enabled,user_template,user_status,user_val_code,
user_registered,user_admin_validated,user_username,user_email,user_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,NULL)' Reason: Duplicate entry 'duplicate@somedomain.com' for key 2 at GForum::User::signup_submit line 352.

Please enable debugging in setup for more details.

I am trying to identify how the error messaging works - if I get it, I will post. I think this is a needed feature and hopefully someone more knowlegable than this newbie can look at it and identify a SIMPLE fix.

Last edited by:

shiner: Jun 7, 2002, 8:04 AM

Edit Log: