Ajout logs
This commit is contained in:
parent
5344a66201
commit
09541f3a0e
@ -63,6 +63,7 @@ class UserGroup
|
|||||||
/**
|
/**
|
||||||
* \brief Charge un objet user avec toutes ces caractéristiques
|
* \brief Charge un objet user avec toutes ces caractéristiques
|
||||||
* \param id id du groupe à charger
|
* \param id id du groupe à charger
|
||||||
|
* \return int <0 si KO, >0 si OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id)
|
||||||
{
|
{
|
||||||
@ -72,8 +73,8 @@ class UserGroup
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
|
||||||
$sql .= " WHERE g.rowid = ".$this->id;
|
$sql .= " WHERE g.rowid = ".$this->id;
|
||||||
|
|
||||||
|
dolibarr_syslog("Usergroup::fetch sql=".$sql);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($result))
|
if ($this->db->num_rows($result))
|
||||||
@ -87,11 +88,12 @@ class UserGroup
|
|||||||
$this->datem = $obj->datem;
|
$this->datem = $obj->datem;
|
||||||
}
|
}
|
||||||
$this->db->free($result);
|
$this->db->free($result);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_syslog("UserGroup::Fetch Erreur");
|
dolibarr_syslog("UserGroup::Fetch Erreur");
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user