FIX Error message
This commit is contained in:
parent
2308d28c19
commit
8aebc37a5f
@ -917,7 +917,7 @@ class User extends CommonObject
|
|||||||
if (empty($this->login))
|
if (empty($this->login))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$this->error = $langs->trans("ErrorFieldRequired",$this->login);
|
$this->error = $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Login"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -929,7 +929,7 @@ class User extends CommonObject
|
|||||||
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."user";
|
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."user";
|
||||||
$sql.= " WHERE login ='".$this->db->escape($this->login)."'";
|
$sql.= " WHERE login ='".$this->db->escape($this->login)."'";
|
||||||
$sql.= " AND entity IN (0,".$this->db->escape($conf->entity).")";
|
$sql.= " AND entity IN (0,".$this->db->escape($conf->entity).")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -962,7 +962,7 @@ class User extends CommonObject
|
|||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -5;
|
return -5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update minor fields
|
// Update minor fields
|
||||||
$result = $this->update($user,1,1);
|
$result = $this->update($user,1,1);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -982,12 +982,12 @@ class User extends CommonObject
|
|||||||
$entrepot->country_id = $mysoc->country_id;
|
$entrepot->country_id = $mysoc->country_id;
|
||||||
$entrepot->create($user);
|
$entrepot->create($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result=$this->call_trigger('USER_CREATE',$user);
|
$result=$this->call_trigger('USER_CREATE',$user);
|
||||||
if ($result < 0) { $error++; }
|
if ($result < 0) { $error++; }
|
||||||
// End call triggers
|
// End call triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user