1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 14:50:48 +03:00

Доработка валидации

This commit is contained in:
Mzhelskiy Maxim 2016-02-26 15:20:09 +07:00
parent 827a9ff5b6
commit b493acfee5
2 changed files with 7 additions and 7 deletions

View file

@ -110,10 +110,10 @@ class ModuleUser_EntityUser extends Entity
*/
public function ValidateLoginExists($sValue, $aParams)
{
if (!$this->User_GetUserByLogin($sValue)) {
return true;
if ($oUserOld = $this->User_GetUserByLogin($sValue) and $oUserOld->getId() != $this->getId()) {
return $this->Lang_Get('auth.registration.notices.error_login_used');
}
return $this->Lang_Get('auth.registration.notices.error_login_used');
return true;
}
/**
@ -125,10 +125,10 @@ class ModuleUser_EntityUser extends Entity
*/
public function ValidateMailExists($sValue, $aParams)
{
if (!$this->User_GetUserByMail($sValue)) {
return true;
if ($oUserOld = $this->User_GetUserByMail($sValue) and $oUserOld->getId() != $this->getId()) {
return $this->Lang_Get('auth.registration.notices.error_mail_used');
}
return $this->Lang_Get('auth.registration.notices.error_mail_used');
return true;
}
/**

@ -1 +1 @@
Subproject commit 019a61c9735354cf3a710ce432405380f0583d9b
Subproject commit 13717ef65ec9d1d630427151a6981615db40b123