|
|
@ -580,9 +580,9 @@ function rcmail_create_user($user, $host)
|
|
|
|
$DB->query("INSERT INTO ".get_table_name('users')."
|
|
|
|
$DB->query("INSERT INTO ".get_table_name('users')."
|
|
|
|
(created, last_login, username, mail_host, alias, language)
|
|
|
|
(created, last_login, username, mail_host, alias, language)
|
|
|
|
VALUES (".$DB->now().", ".$DB->now().", ?, ?, ?, ?)",
|
|
|
|
VALUES (".$DB->now().", ".$DB->now().", ?, ?, ?, ?)",
|
|
|
|
$user,
|
|
|
|
strip_newlines($user),
|
|
|
|
$host,
|
|
|
|
strip_newlines($host),
|
|
|
|
$user_email,
|
|
|
|
strip_newlines($user_email),
|
|
|
|
$_SESSION['user_lang']);
|
|
|
|
$_SESSION['user_lang']);
|
|
|
|
|
|
|
|
|
|
|
|
if ($user_id = $DB->insert_id(get_sequence_name('users')))
|
|
|
|
if ($user_id = $DB->insert_id(get_sequence_name('users')))
|
|
|
@ -604,7 +604,7 @@ function rcmail_create_user($user, $host)
|
|
|
|
(user_id, del, standard, name, email)
|
|
|
|
(user_id, del, standard, name, email)
|
|
|
|
VALUES (?, 0, 1, ?, ?)",
|
|
|
|
VALUES (?, 0, 1, ?, ?)",
|
|
|
|
$user_id,
|
|
|
|
$user_id,
|
|
|
|
$user_name,
|
|
|
|
strip_newlines($user_name),
|
|
|
|
preg_replace('/^@/', $user . '@', $sql_arr[0]));
|
|
|
|
preg_replace('/^@/', $user . '@', $sql_arr[0]));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -614,8 +614,8 @@ function rcmail_create_user($user, $host)
|
|
|
|
(user_id, del, standard, name, email)
|
|
|
|
(user_id, del, standard, name, email)
|
|
|
|
VALUES (?, 0, 1, ?, ?)",
|
|
|
|
VALUES (?, 0, 1, ?, ?)",
|
|
|
|
$user_id,
|
|
|
|
$user_id,
|
|
|
|
$user_name,
|
|
|
|
strip_newlines($user_name),
|
|
|
|
$user_email);
|
|
|
|
strip_newlines($user_email));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// get existing mailboxes
|
|
|
|
// get existing mailboxes
|
|
|
@ -1140,6 +1140,14 @@ function strip_quotes($str)
|
|
|
|
return preg_replace('/[\'"]/', '', $str);
|
|
|
|
return preg_replace('/[\'"]/', '', $str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* Remove new lines characters from given string
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
function strip_newlines($str)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return preg_replace('/[\r\n]/', '', $str);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ************** template parsing and gui functions **************
|
|
|
|
// ************** template parsing and gui functions **************
|
|
|
|
|
|
|
|
|
|
|
|