1
tedsmith
ERROR: Email address already registered
  • 2005/11/21 14:50

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


When users try to register more than one user account (no need to ask why they are - it's too complicated, but I'm allowing it) they get the error : "ERROR: Email address already registered". Obviously their e-mail is clashing with the previous account.

Is there any way to disable the check?

Thanks

Ted

2
tedsmith
Re: ERROR: Email address already registered
  • 2005/11/21 16:38

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


I assume that if I change 103 of register.php from
$count 0;
    if ( 
$email ) {
        
$sql "SELECT COUNT(*) FROM ".$xoopsDB->prefix('users')." where email='".$myts->makeTboxData4Save($email)."'";
        
$result $xoopsDB->query($sql);
        list(
$count) = $xoopsDB->fetchRow($result);
            [
b][color=CC0000]if ( $count ) {[/color][/b]            
                
$stop .= _US_EMAILTAKEN."<br />";


to

$count 0;
    if ( 
$email ) {
        
$sql "SELECT COUNT(*) FROM ".$xoopsDB->prefix('users')." where email='".$myts->makeTboxData4Save($email)."'";
        
$result $xoopsDB->query($sql);
        list(
$count) = $xoopsDB->fetchRow($result);
              [
b][color=CC0000]if ( $count ) {[/color][/b]
            
$stop .= _US_EMAILTAKEN."<br />";


it would only stop if more than two instances of the e-mail address where present?

Ted

3
tedsmith
Re: ERROR: Email address already registered
  • 2005/11/21 17:08

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Yes, it does work. Tried it, and success. I'll revert it back once I've finished what I'm doing.

Ted

4
davidl2
Re: ERROR: Email address already registered
  • 2005/11/21 17:16

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Good work on finding the solution to your problem Ted, as it may help others in the future.

Is it possible to submit this as an FAQ entry as well?

5
tedsmith
Re: ERROR: Email address already registered
  • 2005/11/21 20:53

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


Thanks David. I'm getting the hang of reading PHP code these days and understanding what's going on, although writing it from scratch is still a bit too challenging

I thought about adding it to the FAQ myself, but figured that most people would rarely ever need to do it (as my occasion for doing so is rather unique). But I agree - you just never know what people's needs are, especially with a user base of 30,000 plus!

I have added it as a FAQ here

Cheers

Ted

6
CeBepuH
Re: ERROR: Email address already registered
  • 2005/11/21 21:06

  • CeBepuH

  • Not too shy to talk

  • Posts: 128

  • Since: 2002/6/10


Nice but I think this would mean problems for your users if they ever have to use the lost password recovery mechanism as it uses the enterd email adress to determine to which user to send the new password.
Humans need fantasy to be humans. To be the place where the fallen angel meets the rising ape.

7
tedsmith
Re: ERROR: Email address already registered
  • 2005/11/21 22:21

  • tedsmith

  • Home away from home

  • Posts: 1151

  • Since: 2004/6/2 1


I agree with you, which is why I'm not really recommending it. It's too bizarre and long winded to explain my own circumstances for doing it, but suffice to say my users are re-registering from one style of registration to another, but until everyone has re-registered new accounts I need both sets of user accounts to be valid. Once all the new one's are all done, the old accounts will be deleted and the e-mail duplicate check returned back to false, i.e. 0. And then, like you say, the 'Lost Password' feature should work fine.

Ted

Login

Who's Online

145 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 145


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits