function register() {\r
global $db, $error;\r
\r
+ $guild_id = mysql_real_escape_string(strip_tags(trim($_POST['guild_id'])));\r
$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
$params['node_name'] = 'request for access';\r
$params['flag'] = 'registration';\r
$user_id = nodes::addNode($params);\r
+\r
+ \r
+ //puttin in the guild node is realized only after email verification\r
+ //nodes::putNode($user_id,$guild_id);\r
+\r
$q = sprintf('update nodes set node_system_access = "private" where node_id = %d', $user_id);\r
$db->update($q);\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", xmpp="%s"',\r
- $pass, $user_id, $login, $email, $vercode, $xmpp);\r
+ hash = "%s", xmpp="%s, guild_id="%s""',\r
+ $pass, $user_id, $login, $email, $vercode, $xmpp, $guild_id);\r
$db->query($q); // XXX rewrite\r
$emailtext = sprintf(\r
'Vitaj %s! Prave som sa s radostou dozvedel, ze si vyplnil(a)\r