+ Moved ACP link from footer to header
+ Added PMs limits + Replaced ACP frames to original DSF layout > Version 9.6.25 released. git-svn-id: https://svn.pioder.pl/uf-svn/uF@33 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
117
register.php
117
register.php
@@ -45,70 +45,83 @@ foreach ($_POST as $name => $value)
|
||||
$_POST[$name] = Secure::UseCensorlist($value);
|
||||
}
|
||||
}
|
||||
$errors = false;
|
||||
|
||||
if (isset($_POST['email']))
|
||||
{
|
||||
if ( ereg ("^.+@.+\..+$", $_POST['email']))
|
||||
{ $nick = $_POST['nick'];
|
||||
if ($nick!='')
|
||||
if (!ereg ("^.+@.+\..+$", $_POST['email']))
|
||||
{
|
||||
$sql = "SELECT * FROM `".USERS_TABLE."` WHERE `nick`='$nick'";
|
||||
$errors = true;
|
||||
$message = $lng['invalid_email'];
|
||||
}
|
||||
|
||||
if (trim($_POST['nick'])=='')
|
||||
{
|
||||
$errors = true;
|
||||
$message = $lng['empty_nick'];
|
||||
}
|
||||
|
||||
if ($_POST['password']=='')
|
||||
{
|
||||
$errors = true;
|
||||
$message = $lng['empty_password'];
|
||||
}
|
||||
|
||||
if ($_POST['confirmpassword']=='')
|
||||
{
|
||||
$errors = true;
|
||||
$message = $lng['empty_password'];
|
||||
}
|
||||
|
||||
if ($_POST['valid_match']!=$_POST['valid_key'])
|
||||
{
|
||||
$errors = true;
|
||||
$message = $lng['key_not_valid'];
|
||||
}
|
||||
|
||||
if ($_POST['password']!=$_POST['confirmpassword'])
|
||||
{
|
||||
$errors = true;
|
||||
$message=$lng['incorrect_password2'];
|
||||
}
|
||||
|
||||
if (!$errors)
|
||||
{
|
||||
$nick = addslashes(strip_tags($_POST['nick']));
|
||||
$sql = "SELECT `nick` FROM `".USERS_TABLE."` WHERE `nick`='$nick'";
|
||||
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain user information.');
|
||||
$result = DataBase::fetch($query);
|
||||
$result = $result['nick'];
|
||||
if ($result!=$nick)
|
||||
|
||||
if ($nick == $result['nick'])
|
||||
{
|
||||
if ($_POST['password']!='')
|
||||
{
|
||||
if ($_POST['password']==$_POST['confirmpassword'])
|
||||
{
|
||||
if ($_POST['valid_match']==$_POST['valid_key'])
|
||||
{
|
||||
$_POST['nick']= addslashes(strip_tags($_POST['nick']));
|
||||
$original_pass = $_POST['password'];
|
||||
$_POST['password']=md5($_POST['password']);
|
||||
User::CreateProfile($_POST['nick'],$_POST['password'], $_POST['email'],0,1,0,1,'','','');
|
||||
$stop = TimeGeneration();
|
||||
if ($forum_config['allow_send_email'])
|
||||
{
|
||||
SendRegisterEmail();
|
||||
}
|
||||
message_forum($lng['account_created'],'index.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $lng['key_not_valid'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=$lng['incorrect_password2'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=$lng['empty_password'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
}
|
||||
}
|
||||
else
|
||||
$errors = true;
|
||||
$message = $lng['user_is_exist'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$errors)
|
||||
{
|
||||
$_POST['nick']= addslashes(strip_tags($_POST['nick']));
|
||||
$original_pass = addslashes($_POST['password']);
|
||||
$_POST['password']=md5($_POST['password']);
|
||||
|
||||
User::CreateProfile($_POST['nick'],$_POST['password'], $_POST['email'],0,1,0,1,'','','');
|
||||
|
||||
$stop = TimeGeneration();
|
||||
|
||||
if ($forum_config['allow_send_email'])
|
||||
{
|
||||
$message=$lng['user_is_exist'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
SendRegisterEmail();
|
||||
}
|
||||
|
||||
message_forum($lng['account_created'],'index.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=$lng['empty_email'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$message=$lng['invalid_email'];
|
||||
$msg = './skins/'.$default_skin.'/post_error_body.tpl';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user