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 > 0 ) {
$stop .= _US_EMAILTAKEN."
";
}
}
add right after >
if ( (isset($email)) && ($email != $vemail) ) {
$stop .= _US_EMAILNOTSAME.'
';
}
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)."
";
add after >
echo _US_VEMAIL.": ".$myts->htmlSpecialChars($vemail)."
";
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", 30, 60, $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..