1
stuie200
Email verification on registration
  • 2005/11/17 12:00

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Is it possible to add a second email input box into the registration screen to validate both email address's entered for new users as I have a few new members who have registered but did not get their confirmation email because they entered their email address incorrectly.

Thanks in advance to all who reply.
"I'm as confused as a baby in a topless bar."

2
LazyBadger
Re: Email verification on registration

Yes
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

3
stuie200
Re: Email verification on registration
  • 2005/11/17 15:36

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Quote:

LazyBadger wrote:
Yes


Sorry, i know it is poss but i guess what i am asking if anybody can help me out doing this and give me some code examples if poss please
"I'm as confused as a baby in a topless bar."

4
zyspec
Re: Email verification on registration
  • 2005/11/17 15:51

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Which version of XOOPS are you using?

5
stuie200
Re: Email verification on registration
  • 2005/11/17 17:21

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Quote:

Which version of XOOPS are you using?


2.0.10 but upgrading soon
"I'm as confused as a baby in a topless bar."

6
m0nty
Re: Email verification on registration
  • 2005/11/17 19:41

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


xoops 2.0.13.2

register.php

find >

if ( $email ) {
        
$sql sprintf('SELECT COUNT(*) FROM %s WHERE email = %s'$xoopsDB->prefix('users'), $xoopsDB->quoteString(addslashes($email)));
        
$result $xoopsDB->query($sql);
        list(
$count) = $xoopsDB->fetchRow($result);
        if ( 
$count ) {
            
$stop .= _US_EMAILTAKEN."<br />";
        }
    }


add right after >

if ( (isset($email)) && ($email != $vemail) ) {
        
$stop .= _US_EMAILNOTSAME.'<br />';
    }


find >

$email = isset($_POST['email']) ? trim($myts->stripSlashesGPC($_POST['email'])) : '';


add after >

$vemail = isset($_POST['vemail']) ? trim($myts->stripSlashesGPC($_POST['vemail'])) : '';


find >

echo _US_EMAIL.": ".$myts->htmlSpecialChars($email)."<br />";


add after >

echo _US_VEMAIL.": ".$myts->htmlSpecialChars($vemail)."<br />";


find >

<input type='hidden' name='email' value='".$myts->htmlSpecialChars($email)."' />


REPLACE with >

<input type='hidden' name='email' value='".$myts->htmlSpecialChars($email)."' />
        <
input type='hidden' name='vemail' value='".$myts->htmlSpecialChars($vemail)."' />";


find >

$stop userCheck($uname$email$pass$vpass);


REPLACE with >

$stop userCheck($uname$email$vemail$pass$vpass);



save register.php

open include/registerform.php

find >

$reg_form->addElement($email_tray);


add after >

$reg_form->addElement(new XoopsFormText(_US_VEMAIL"vemail"3060$myts->htmlSpecialChars($vemail)), true);


save..

open language/english/user.php

add these to the file >

define('_US_EMAILNOTSAME','Both emails are different. They must be identical.');

define('_US_VEMAIL','Verify Email');


save & you're done..

7
Bananadude
Re: Email verification on registration
  • 2005/11/17 21:05

  • Bananadude

  • Not too shy to talk

  • Posts: 155

  • Since: 2005/9/16


woh, excelent work m0nty, I want this too is the code same for 2.2.3?
--- censored by Bananadude ---

8
stuie200
Re: Email verification on registration
  • 2005/11/18 10:45

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Thanks very much for this Monty.

I'll try this when i get home and let you know how i get on.
"I'm as confused as a baby in a topless bar."

9
stuie200
Re: Email verification on registration
  • 2005/11/18 20:37

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


I have tried this but it keeps looping saying email address's are different even though i have cut and pasted them into the required fields.

Any ideas what may be causing this please?

You can try yourself on my site if you like.

http:www.slcwebdev.co.uk/tractiontime

just for reference I am now using XOOPS 2.0.13.2
"I'm as confused as a baby in a topless bar."

Login

Who's Online

148 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 148


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