FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Minor Admin CP suggestion
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Minor Admin CP suggestion [message #15517] Wed, 17 December 2003 18:21 Go to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
When testing out the forum yesterday, I kept trying to add a new user, only to have it fail with the error message "[username] already exists," even though the name didn't.

I finally figured out that what did already exist was the *email* address. Because I was testing, I was trying to use the same address for the second account.

I think the error message should reflect this.
Re: Minor Admin CP suggestion [message #15528 is a reply to message #15517] Wed, 17 December 2003 21:30 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Which version of the forum are you using and what database backend, the check to give a proper error is already there.

FUDforum Core Developer
Re: Minor Admin CP suggestion [message #15531 is a reply to message #15528] Wed, 17 December 2003 22:09 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
I'm using RC11 with MySQL.
Re: Minor Admin CP suggestion [message #15532 is a reply to message #15531] Wed, 17 December 2003 22:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
MySQL 3.23.* or MySQL 4.0.X?

FUDforum Core Developer
Re: Minor Admin CP suggestion [message #15543 is a reply to message #15532] Thu, 18 December 2003 14:02 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
3.23.58-1.80
Re: Minor Admin CP suggestion [message #15544 is a reply to message #15543] Thu, 18 December 2003 14:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I've tried the code yesterday with MySQL 3.23.58 and 4.0.16 and in both instances proper error was raised when an attempt to create a user with a duplicate e-mail was made.

The only time this may not work is if BOTH the login & the e-mail are duplicate.


FUDforum Core Developer
Re: Minor Admin CP suggestion [message #15546 is a reply to message #15517] Thu, 18 December 2003 15:03 Go to previous messageGo to next message
Gribnif is currently offline  Gribnif   United States
Messages: 82
Registered: December 2003
Karma: 0
Member
This is the result I just got when I tried it again:

Add User
Error Has Occured
Register a new forum user.
Login: Login (lkjglj) is already in use.

Where lkjglj is just a random set of characters I banged on the keyboard, and only the email address was the same as another account.

I just pulled the code out of admadduser.php and substituted what seemed like good values:

INSERT INTO fud_users
 (login, alias, passwd, name, email, time_zone, join_date, theme, users_opt, last_read) VALUES (
 'lkdjfgl', 'kjhertk', 'junk',
 'ldfglnkre', '[duplicate email address]', 'timezone',
 'stamp', 'default', 0, 'stamp');

This produced the MySQL error:

ERROR 1062: Duplicate entry '[duplicate email address]' for key 2

Note that it says key 2. According to the code in admadduser, this gives the (wrong) error message I'm seeing. If I instead change the SQL code so that the "login" field is the duplicate, MySQL says this is key 3.

A "SHOW CREATE TABLE fud_users" lists the keys in this order:
  PRIMARY KEY  (`id`),
  UNIQUE KEY `fud_users_i_e` (`email`),
  UNIQUE KEY `fud_users_i_l` (`login`),
  UNIQUE KEY `fud_users_i_a` (`alias`),
  KEY `fud_users_i_rk` (`reset_key`),
  KEY `fud_users_i_lv` (`last_visit`),
  KEY `fud_users_i_ck` (`conf_key`),
  KEY `fud_users_i_ri` (`referer_id`),
  KEY `fud_users_i_uo` (`users_opt`)
) TYPE=MyISAM |
Re: Minor Admin CP suggestion [message #15547 is a reply to message #15546] Thu, 18 December 2003 15:25 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: index.php problem
Next Topic: Case-sensitivity problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 03 23:07:49 GMT 2024

Total time taken to generate the page: 0.02196 seconds