2
0
forked from Wavyzz/dolibarr

Debug v20

This commit is contained in:
Laurent Destailleur
2024-09-02 10:21:24 +02:00
parent 175a53f4b2
commit ef84ba2a13
4 changed files with 7 additions and 7 deletions

View File

@@ -152,7 +152,7 @@ class UserGroup extends CommonObject
/**
* Charge un object group avec toutes ses caracteristiques (except ->members array)
* Load a group object with all properties (except ->members array that is array of users in group)
*
* @param int $id Id of group to load
* @param string $groupname Name of group to load
@@ -161,8 +161,6 @@ class UserGroup extends CommonObject
*/
public function fetch($id = 0, $groupname = '', $load_members = false)
{
global $conf;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
if (!empty($groupname)) {
$result = $this->fetchCommon(0, '', ' AND nom = \''.$this->db->escape($groupname).'\'');
@@ -174,7 +172,8 @@ class UserGroup extends CommonObject
if ($result) {
if ($load_members) {
$this->members = $this->listUsersForGroup(); // This make a lot of subrequests
$excludefilter = '';
$this->members = $this->listUsersForGroup($excludefilter, 0); // This make a request to get list of users but may also do subrequest to fetch each users on some versions
}
return 1;