1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-19 09:18:18 +03:00

fix регистрации

This commit is contained in:
Mzhelskiy Maxim 2011-08-22 13:03:19 +00:00
parent c4625a52fe
commit 1295d1bc87

View file

@ -79,6 +79,14 @@ class ActionRegistration extends Action {
if (!$this->User_CheckLogin(getRequest('login'))) {
$this->Message_AddError($this->Lang_Get('registration_login_error'),$this->Lang_Get('error'));
$bError=true;
} else {
/**
* А не занят ли логин?
*/
if ($this->User_GetUserByLogin(getRequest('login'))) {
$this->Message_AddError($this->Lang_Get('registration_login_error_used'),$this->Lang_Get('error'));
$bError=true;
}
}
/**
* Проверка мыла
@ -86,6 +94,14 @@ class ActionRegistration extends Action {
if (!func_check(getRequest('mail'),'mail')) {
$this->Message_AddError($this->Lang_Get('registration_mail_error'),$this->Lang_Get('error'));
$bError=true;
} else {
/**
* А не занято ли мыло?
*/
if ($this->User_GetUserByMail(getRequest('mail'))) {
$this->Message_AddError($this->Lang_Get('registration_mail_error_used'),$this->Lang_Get('error'));
$bError=true;
}
}
/**
* Проверка пароля
@ -104,20 +120,7 @@ class ActionRegistration extends Action {
$this->Message_AddError($this->Lang_Get('registration_captcha_error'),$this->Lang_Get('error'));
$bError=true;
}
/**
* А не занят ли логин?
*/
if ($this->User_GetUserByLogin(getRequest('login'))) {
$this->Message_AddError($this->Lang_Get('registration_login_error_used'),$this->Lang_Get('error'));
$bError=true;
}
/**
* А не занято ли мыло?
*/
if ($this->User_GetUserByMail(getRequest('mail'))) {
$this->Message_AddError($this->Lang_Get('registration_mail_error_used'),$this->Lang_Get('error'));
$bError=true;
}
/**
* Если всё то пробуем зарегить
*/