Gestion erreur user

This commit is contained in:
Laurent Destailleur 2007-04-13 16:11:44 +00:00
parent 3128ef4f87
commit ea2f6c356d

View File

@ -105,9 +105,9 @@ class User
/** /**
\brief Charge un objet user avec toutes ces caractéristiques depuis un id ou login * \brief Charge un objet user avec toutes ces caractéristiques depuis un id ou login
\param login Si défini, login a utiliser pour recherche * \param login Si défini, login a utiliser pour recherche
\return int <0 si ko, >0 si ok * \return int <0 si ko, >0 si ok
*/ */
function fetch($login='') function fetch($login='')
{ {
@ -169,9 +169,17 @@ class User
$this->societe_id = $obj->fk_societe; $this->societe_id = $obj->fk_societe;
if (! $this->lang) $this->lang='fr_FR'; if (! $this->lang) $this->lang='fr_FR';
}
$this->db->free($result);
$this->db->free($result);
}
else
{
$this->error="USERNOTFOUND";
dolibarr_syslog("User::fetch Error -2, fails to get user - ".$this->error." - sql=".$sql);
$this->db->free($result);
return -2;
}
} }
else else
{ {