$content = mysql_real_escape_string(strip_tags(trim($_POST['reg_content'])));\r
$email = mysql_real_escape_string(strip_tags(trim($_POST['reg_email'])));\r
$login = mysql_real_escape_string(strip_tags(trim($_POST['reg_login'])));\r
+ $xmpp = mysql_real_escape_string(strtolower(strip_tags(trim($_POST['reg_login']))));\r
$pass = mysql_real_escape_string($_POST['reg_pass']);\r
$pass2 = mysql_real_escape_string($_POST['reg_pass2']);\r
\r
}\r
\r
$set = $db->query(sprintf('select login from users where \r
- login = "%s" or email = "%s"', $login, $email));\r
+ login = "%s" or email = "%s" or xmpp = "%s"', $login, $email, $xmpp));\r
if ($set->getNumRows() > 0) {\r
- $error = sprintf('No-no, user with this email is already registered');\r
+ $error = sprintf('No-no, user with this nick/email is already registered');\r
return false;\r
}\r
\r
$vercode = substr( md5( uniqid( rand() ) ), rand(0, 7), 23);\r
$q = sprintf('insert into users set password = "%s", user_id = %d,\r
header_id = 2091520, login = "%s", email = "%s",\r
- hash = "%s"',\r
- $pass, $user_id, $login, $email, $vercode);\r
+ hash = "%s", xmpp="%s"',\r
+ $pass, $user_id, $login, $email, $vercode, $xmpp);\r
$db->query($q); // XXX rewrite\r
$emailtext = sprintf(\r
'Vitaj %s! Prave som sa s radostou dozvedel, ze si vyplnil(a)\r