Skip to content
Snippets Groups Projects
Commit 6f4a887d authored by llaffont's avatar llaffont
Browse files

Correction import des abonnes cosmogramme

git-svn-id: http://afi-forge.afi-sa.fr/svn/opacce/trunk@2599 e3cc70dd-a52f-4065-8a26-0e09943c8c5c
parent 03cfd442
Branches
Tags
No related merge requests found
...@@ -630,10 +630,10 @@ class Class_Users extends Storm_Model_Abstract { ...@@ -630,10 +630,10 @@ class Class_Users extends Storm_Model_Abstract {
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------
// Vérification pour eviter les doublons de login // Vérification pour eviter les doublons de login
//------------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------------
public function ifLoginExist($login) { public function ifLoginExist($login, $site) {
$login = (trim($login)); $login = (trim($login));
$login = $this->getLoader()->findFirstBy(array('login' => $login)); $login = $this->getLoader()->findFirstBy(['login' => $login, 'id_site' => $site]);
return ($login != null); return ($login != null);
} }
...@@ -644,7 +644,7 @@ class Class_Users extends Storm_Model_Abstract { ...@@ -644,7 +644,7 @@ class Class_Users extends Storm_Model_Abstract {
$this->check(mb_strlen($this->getLogin(),'UTF-8') <= 50, $this->_translate->_("Le champ 'Identifiant' doit être inférieur à 50 caractères")); $this->check(mb_strlen($this->getLogin(),'UTF-8') <= 50, $this->_translate->_("Le champ 'Identifiant' doit être inférieur à 50 caractères"));
if ($this->isNew()) { if ($this->isNew()) {
$this->check($this->ifLoginExist($this->getLogin()) == false, $this->check($this->ifLoginExist($this->getLogin(), $this->getIdSite()) == false,
$this->_translate->_("L'identifiant que vous avez choisi existe déjà.")); $this->_translate->_("L'identifiant que vous avez choisi existe déjà."));
} }
......
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