mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r359
При проверке мыла, если своё же, не возвращаем ошибку. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@359 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
e28ac5224a
commit
1b855e9de7
2 changed files with 8 additions and 5 deletions
|
@ -53,7 +53,7 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.4 (beta)';
|
||||
$bb_cfg['tp_release_state'] = 'R358';
|
||||
$bb_cfg['tp_release_state'] = 'R359';
|
||||
$bb_cfg['tp_release_date'] = '06-02-2012';
|
||||
|
||||
// Database
|
||||
|
|
|
@ -68,7 +68,7 @@ function validate_username ($username, $check_ban_and_taken = true)
|
|||
// Check to see if email address is banned or already present in the DB
|
||||
function validate_email ($email, $check_ban_and_taken = true)
|
||||
{
|
||||
global $lang;
|
||||
global $lang, $userdata;
|
||||
|
||||
if (!$email || !preg_match('#^([_a-z\d])[a-z\d\.\-_]+@[a-z\d\-]+\.([a-z\d\-]+\.)*?[a-z]{2,4}$#i', $email))
|
||||
{
|
||||
|
@ -97,9 +97,12 @@ function validate_email ($email, $check_ban_and_taken = true)
|
|||
|
||||
$email_sql = DB()->escape($email);
|
||||
|
||||
if (DB()->fetch_row("SELECT 1 FROM ". BB_USERS ." WHERE user_email = '$email_sql' LIMIT 1"))
|
||||
if ($row = DB()->fetch_row("SELECT `user_email` FROM ". BB_USERS ." WHERE user_email = '$email_sql' LIMIT 1"))
|
||||
{
|
||||
return $lang['EMAIL_TAKEN'];
|
||||
if($row['user_email'] == $userdata['user_email'])
|
||||
return false;
|
||||
else
|
||||
return $lang['EMAIL_TAKEN'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue