--no commit message

--no commit message
parent 9412190d
......@@ -30,10 +30,9 @@ function userNameExists($nickname, $id = '')
*/
function userEmailExists($mail, $id = '')
{
$in = array($mail . ':1', $mail . ':0');
if (ACP3_Validate::isNumber($id) === true) {
return ACP3_Validate::email($mail) === true && ACP3_CMS::$db2->executeQuery('SELECT COUNT(*) FROM ' . DB_PRE . 'users WHERE id != ? AND mail IN(?)', array($id, $in), array(\PDO::PARAM_INT, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY))->fetch(PDO::FETCH_COLUMN) > 0 ? true : false;
return ACP3_Validate::email($mail) === true && ACP3_CMS::$db2->executeQuery('SELECT COUNT(*) FROM ' . DB_PRE . 'users WHERE id != ? AND mail = ?', array($id, $mail), array(\PDO::PARAM_INT, \PDO::PARAM_STR))->fetch(PDO::FETCH_COLUMN) > 0 ? true : false;
} else {
return ACP3_Validate::email($mail) === true && ACP3_CMS::$db2->executeQuery('SELECT COUNT(*) FROM ' . DB_PRE . 'users WHERE mail IN(?)', array($in), array(\Doctrine\DBAL\Connection::PARAM_STR_ARRAY))->fetch(PDO::FETCH_COLUMN) > 0 ? true : false;
return ACP3_Validate::email($mail) === true && ACP3_CMS::$db2->executeQuery('SELECT COUNT(*) FROM ' . DB_PRE . 'users WHERE mail = ?', array($mail), array(\PDO::PARAM_STR))->fetch(PDO::FETCH_COLUMN) > 0 ? true : false;
}
}
\ No newline at end of file
......@@ -44,24 +44,15 @@ if (ACP3_CMS::$auth->isUser() === true) {
$salt = salt(12);
$insert_values = array(
'id' => '',
'nickname' => str_encode($_POST['nickname']),
'pwd' => generateSaltedPassword($salt, $_POST['pwd']) . ':' . $salt,
'realname' => ':1',
'gender' => ':1',
'birthday' => ':1',
'birthday_format' => '1',
'mail' => $_POST['mail'] . ':1',
'website' => ':1',
'icq' => ':1',
'msn' => ':1',
'skype' => ':1',
'birthday_display' => '1',
'mail' => $_POST['mail'],
'date_format_long' => CONFIG_DATE_FORMAT_LONG,
'date_format_short' => CONFIG_DATE_FORMAT_SHORT,
'time_zone' => CONFIG_DATE_TIME_ZONE,
'language' => CONFIG_LANG,
'entries' => CONFIG_ENTRIES,
'draft' => '',
);
ACP3_CMS::$db2->beginTransaction();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment