FIX Error message
This commit is contained in:
parent
2308d28c19
commit
8aebc37a5f
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user