diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2e4f2a7351a..85c1e0e63da 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -917,7 +917,7 @@ class User extends CommonObject if (empty($this->login)) { $langs->load("errors"); - $this->error = $langs->trans("ErrorFieldRequired",$this->login); + $this->error = $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Login")); return -1; } @@ -929,7 +929,7 @@ class User extends CommonObject $sql = "SELECT login FROM ".MAIN_DB_PREFIX."user"; $sql.= " WHERE login ='".$this->db->escape($this->login)."'"; $sql.= " AND entity IN (0,".$this->db->escape($conf->entity).")"; - + dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) @@ -962,7 +962,7 @@ class User extends CommonObject $this->db->rollback(); return -5; } - + // Update minor fields $result = $this->update($user,1,1); if ($result < 0) @@ -982,12 +982,12 @@ class User extends CommonObject $entrepot->country_id = $mysoc->country_id; $entrepot->create($user); } - + if (! $notrigger) { // Call trigger $result=$this->call_trigger('USER_CREATE',$user); - if ($result < 0) { $error++; } + if ($result < 0) { $error++; } // End call triggers }