31require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
32if (isModEnabled(
'ldap')) {
33 require_once DOL_DOCUMENT_ROOT.
"/core/class/ldap.class.php";
45 public $element =
'usergroup';
50 public $table_element =
'usergroup';
56 public $ismultientitymanaged = 1;
61 public $picto =
'group';
101 public $members = array();
108 private $_tab_loaded = array();
113 public $all_permissions_are_loaded;
117 public $fields = array(
118 'rowid'=>array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>1,
'visible'=>-2,
'notnull'=>1,
'index'=>1,
'position'=>1,
'comment'=>
'Id'),
119 'entity' => array(
'type'=>
'integer',
'label'=>
'Entity',
'enabled'=>1,
'visible'=>0,
'notnull'=> 1,
'default'=>1,
'index'=>1,
'position'=>5),
120 'nom'=>array(
'type'=>
'varchar(180)',
'label'=>
'Name',
'enabled'=>1,
'visible'=>1,
'notnull'=>1,
'showoncombobox'=>1,
'index'=>1,
'position'=>10,
'searchall'=>1,
'comment'=>
'Group name'),
121 'note' => array(
'type'=>
'html',
'label'=>
'Description',
'enabled'=>1,
'visible'=>1,
'position'=>20,
'notnull'=>-1,
'searchall'=>1),
122 'datec' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>1,
'visible'=>-2,
'position'=>50,
'notnull'=>1,),
123 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>1,
'visible'=>-2,
'position'=>60,
'notnull'=>1,),
124 'model_pdf' =>array(
'type'=>
'varchar(255)',
'label'=>
'ModelPDF',
'enabled'=>1,
'visible'=>0,
'position'=>100),
130 public $fk_element =
'fk_usergroup';
135 protected $childtables = array();
140 protected $childtablesoncascade = array(
'usergroup_rights',
'usergroup_user');
151 $this->nb_rights = 0;
163 public function fetch($id =
'', $groupname =
'', $load_members =
false)
167 dol_syslog(get_class($this).
"::fetch", LOG_DEBUG);
168 if (!empty($groupname)) {
169 $result = $this->
fetchCommon(0,
'',
' AND nom = \''.$this->db->escape($groupname).
'\'');
174 $this->
name = $this->nom;
183 $this->error = $this->db->lasterror();
202 $sql =
"SELECT g.rowid, ug.entity as usergroup_entity";
203 $sql .=
" FROM ".$this->db->prefix().
"usergroup as g,";
204 $sql .=
" ".$this->db->prefix().
"usergroup_user as ug";
205 $sql .=
" WHERE ug.fk_usergroup = g.rowid";
206 $sql .=
" AND ug.fk_user = ".((int) $userid);
207 if (isModEnabled(
'multicompany') && $conf->entity == 1 && $user->admin && !$user->entity) {
208 $sql .=
" AND g.entity IS NOT NULL";
210 $sql .=
" AND g.entity IN (0,".$conf->entity.
")";
212 $sql .=
" ORDER BY g.nom";
214 dol_syslog(get_class($this).
"::listGroupsForUser", LOG_DEBUG);
215 $result = $this->db->query($sql);
217 while ($obj = $this->db->fetch_object($result)) {
218 if (!array_key_exists($obj->rowid, $ret)) {
220 $newgroup->fetch($obj->rowid,
'', $load_members);
221 $ret[$obj->rowid] = $newgroup;
224 $ret[$obj->rowid]->usergroup_entity[] = $obj->usergroup_entity;
227 $this->db->free($result);
231 $this->error = $this->db->lasterror();
249 $sql =
"SELECT u.rowid, u.login, u.lastname, u.firstname, u.photo, u.fk_soc, u.entity, u.employee, u.email, u.statut as status";
250 if (!empty($this->
id)) {
251 $sql .=
", ug.entity as usergroup_entity";
253 $sql .=
" FROM ".$this->db->prefix().
"user as u";
254 if (!empty($this->
id)) {
255 $sql .=
", ".$this->db->prefix().
"usergroup_user as ug";
257 $sql .=
" WHERE 1 = 1";
258 if (!empty($this->
id)) {
259 $sql .=
" AND ug.fk_user = u.rowid";
261 if (!empty($this->
id)) {
262 $sql .=
" AND ug.fk_usergroup = ".((int) $this->
id);
264 if (isModEnabled(
'multicompany') && $conf->entity == 1 && $user->admin && !$user->entity) {
265 $sql .=
" AND u.entity IS NOT NULL";
267 $sql .=
" AND u.entity IN (0,".$conf->entity.
")";
269 if (!empty($excludefilter)) {
270 $sql .=
' AND ('.$excludefilter.
')';
273 dol_syslog(get_class($this).
"::listUsersForGroup", LOG_DEBUG);
274 $resql = $this->db->query($sql);
277 while ($obj = $this->db->fetch_object($resql)) {
278 if (!array_key_exists($obj->rowid, $ret)) {
280 $newuser =
new User($this->db);
282 $newuser->id = $obj->rowid;
283 $newuser->login = $obj->login;
284 $newuser->photo = $obj->photo;
285 $newuser->lastname = $obj->lastname;
286 $newuser->firstname = $obj->firstname;
287 $newuser->email = $obj->email;
288 $newuser->socid = $obj->fk_soc;
289 $newuser->entity = $obj->entity;
290 $newuser->employee = $obj->employee;
291 $newuser->status = $obj->status;
293 $ret[$obj->rowid] = $newuser;
295 $ret[$obj->rowid] = $obj->rowid;
298 if ($mode != 1 && !empty($obj->usergroup_entity)) {
299 $ret[$obj->rowid]->usergroup_entity[] = $obj->usergroup_entity;
303 $this->db->free($resql);
307 $this->error = $this->db->lasterror();
321 public function addrights($rid, $allmodule =
'', $allperms =
'', $entity = 0)
323 global $conf, $user, $langs;
325 $entity = (!empty($entity) ? $entity : $conf->entity);
327 dol_syslog(get_class($this).
"::addrights $rid, $allmodule, $allperms, $entity");
334 $module = $perms = $subperms =
'';
338 $sql =
"SELECT module, perms, subperms";
339 $sql .=
" FROM ".$this->db->prefix().
"rights_def";
340 $sql .=
" WHERE id = ".((int) $rid);
341 $sql .=
" AND entity = ".((int) $entity);
343 $result = $this->db->query($sql);
345 $obj = $this->db->fetch_object($result);
347 $module = $obj->module;
348 $perms = $obj->perms;
349 $subperms = $obj->subperms;
357 $whereforadd =
"id=".((int) $rid);
360 $whereforadd .=
" OR (module='".$this->db->escape($module).
"' AND perms='".$this->db->escape($perms).
"' AND (subperms='lire' OR subperms='read'))";
362 $whereforadd .=
" OR (module='".$this->db->escape($module).
"' AND (perms='lire' OR perms='read') AND subperms IS NULL)";
366 if (!empty($allmodule)) {
367 if ($allmodule ==
'allmodules') {
368 $whereforadd =
'allmodules';
370 $whereforadd =
"module='".$this->db->escape($allmodule).
"'";
371 if (!empty($allperms)) {
372 $whereforadd .=
" AND perms='".$this->db->escape($allperms).
"'";
379 if (!empty($whereforadd)) {
382 $sql .=
" FROM ".$this->db->prefix().
"rights_def";
383 $sql .=
" WHERE entity = ".((int) $entity);
384 if (!empty($whereforadd) && $whereforadd !=
'allmodules') {
385 $sql .=
" AND ".$whereforadd;
388 $result = $this->db->query($sql);
390 $num = $this->db->num_rows($result);
393 $obj = $this->db->fetch_object($result);
396 $sql =
"DELETE FROM ".$this->db->prefix().
"usergroup_rights WHERE fk_usergroup = ".((int) $this->
id).
" AND fk_id=".((int) $nid).
" AND entity = ".((int) $entity);
397 if (!$this->db->query($sql)) {
400 $sql =
"INSERT INTO ".$this->db->prefix().
"usergroup_rights (entity, fk_usergroup, fk_id) VALUES (".((int) $entity).
", ".((int) $this->
id).
", ".((int) $nid).
")";
401 if (!$this->db->query($sql)) {
413 $langs->load(
"other");
414 $this->context = array(
'audit'=>$langs->trans(
"PermissionsAdd").($rid ?
' (id='.$rid.
')' :
''));
417 $result = $this->
call_trigger(
'USERGROUP_MODIFY', $user);
426 $this->db->rollback();
444 public function delrights($rid, $allmodule =
'', $allperms =
'', $entity = 0)
446 global $conf, $user, $langs;
451 $entity = (!empty($entity) ? $entity : $conf->entity);
456 $module = $perms = $subperms =
'';
460 $sql =
"SELECT module, perms, subperms";
461 $sql .=
" FROM ".$this->db->prefix().
"rights_def";
462 $sql .=
" WHERE id = ".((int) $rid);
463 $sql .=
" AND entity = ".((int) $entity);
465 $result = $this->db->query($sql);
467 $obj = $this->db->fetch_object($result);
469 $module = $obj->module;
470 $perms = $obj->perms;
471 $subperms = $obj->subperms;
479 $wherefordel =
"id = ".((int) $rid);
481 if ($subperms ==
'lire' || $subperms ==
'read') {
482 $wherefordel .=
" OR (module='".$this->db->escape($module).
"' AND perms='".$this->db->escape($perms).
"' AND subperms IS NOT NULL)";
484 if ($perms ==
'lire' || $perms ==
'read') {
485 $wherefordel .=
" OR (module='".$this->db->escape($module).
"')";
493 if (!empty($allmodule)) {
494 if ($allmodule ==
'allmodules') {
495 $wherefordel =
'allmodules';
497 $wherefordel =
"module='".$this->db->escape($allmodule).
"'";
498 if (!empty($allperms)) {
499 $wherefordel .=
" AND perms='".$this->db->escape($allperms).
"'";
506 if (!empty($wherefordel)) {
509 $sql .=
" FROM ".$this->db->prefix().
"rights_def";
510 $sql .=
" WHERE entity = ".((int) $entity);
511 if (!empty($wherefordel) && $wherefordel !=
'allmodules') {
512 $sql .=
" AND ".$wherefordel;
515 $result = $this->db->query($sql);
517 $num = $this->db->num_rows($result);
522 $obj = $this->db->fetch_object($result);
527 $sql =
"DELETE FROM ".$this->db->prefix().
"usergroup_rights";
528 $sql .=
" WHERE fk_usergroup = $this->id AND fk_id=".((int) $nid);
529 $sql .=
" AND entity = ".((int) $entity);
530 if (!$this->db->query($sql)) {
542 $langs->load(
"other");
543 $this->context = array(
'audit'=>$langs->trans(
"PermissionsDelete").($rid ?
' (id='.$rid.
')' :
''));
546 $result = $this->
call_trigger(
'USERGROUP_MODIFY', $user);
555 $this->db->rollback();
574 if ($moduletag && isset($this->_tab_loaded[$moduletag]) && $this->_tab_loaded[$moduletag]) {
579 if (!empty($this->all_permissions_are_loaded)) {
587 $sql =
"SELECT r.module, r.perms, r.subperms ";
588 $sql .=
" FROM ".$this->db->prefix().
"usergroup_rights as u, ".$this->db->prefix().
"rights_def as r";
589 $sql .=
" WHERE r.id = u.fk_id";
590 $sql .=
" AND r.entity = ".((int) $conf->entity);
591 $sql .=
" AND u.entity = ".((int) $conf->entity);
592 $sql .=
" AND u.fk_usergroup = ".((int) $this->
id);
593 $sql .=
" AND r.perms IS NOT NULL";
595 $sql .=
" AND r.module = '".$this->db->escape($moduletag).
"'";
598 dol_syslog(get_class($this).
'::getrights', LOG_DEBUG);
599 $resql = $this->db->query($sql);
601 $num = $this->db->num_rows($resql);
604 $obj = $this->db->fetch_object($resql);
607 $module = $obj->module;
608 $perms = $obj->perms;
609 $subperms = $obj->subperms;
612 if (!isset($this->rights)) {
613 $this->rights =
new stdClass();
615 if (!isset($this->rights->$module) || !is_object($this->rights->$module)) {
616 $this->rights->$module =
new stdClass();
619 if (!isset($this->rights->$module->$perms) || !is_object($this->rights->$module->$perms)) {
620 $this->rights->$module->$perms =
new stdClass();
622 if (empty($this->rights->$module->$perms->$subperms)) {
625 $this->rights->$module->$perms->$subperms = 1;
627 if (empty($this->rights->$module->$perms)) {
630 $this->rights->$module->$perms = 1;
637 $this->db->free($resql);
640 if ($moduletag ==
'') {
643 $this->all_permissions_are_loaded = 1;
646 $this->_tab_loaded[$moduletag] = 1;
658 public function delete(
User $user)
674 if (!empty($this->
name)) {
675 $this->nom = $this->name;
678 if (!isset($this->entity)) {
679 $this->entity = $conf->entity;
695 if (!empty($this->
name)) {
696 $this->nom = $this->name;
712 public function getFullName($langs, $option = 0, $nameorder = -1, $maxlen = 0)
715 $lastname = $this->lastname;
716 $firstname = $this->firstname;
717 if (empty($lastname)) {
718 $lastname = (isset($this->lastname) ? $this->lastname : (isset($this->
name) ? $this->
name : (isset($this->nom) ? $this->nom : (isset($this->societe) ? $this->societe : (isset($this->company) ? $this->company :
'')))));
722 if (!empty($option) && !empty($this->civility_code)) {
723 if ($langs->transnoentitiesnoconv(
"Civility".$this->civility_code) !=
"Civility".$this->civility_code) {
724 $ret .= $langs->transnoentitiesnoconv(
"Civility".$this->civility_code).
' ';
726 $ret .= $this->civility_code.
' ';
758 $langs->load(
'users');
771 global $conf, $langs, $menumanager;
773 $option = $params[
'option'] ??
'';
776 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
777 $langs->load(
"users");
778 return [
'optimize' => $langs->trans(
"ShowGroup")];
780 $datas[
'divopen'] =
'<div class="centpercent">';
781 $datas[
'picto'] =
img_picto(
'',
'group').
' <u>'.$langs->trans(
"Group").
'</u><br>';
782 $datas[
'name'] =
'<b>'.$langs->trans(
'Name').
':</b> '.$this->name;
783 $datas[
'description'] =
'<br><b>'.$langs->trans(
"Description").
':</b> '.$this->note;
784 $datas[
'divclose'] =
'</div>';
800 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
802 global $langs, $conf, $db, $hookmanager;
804 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpicto) {
811 'objecttype' => $this->element,
814 $classfortooltip =
'classfortooltip';
817 $classfortooltip =
'classforajaxtooltip';
818 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
824 if ($option ==
'permissions') {
825 $url = DOL_URL_ROOT.
'/user/group/perms.php?id='.$this->id;
827 $url = DOL_URL_ROOT.
'/user/group/card.php?id='.$this->id;
830 if ($option !=
'nolink') {
832 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
833 if ($save_lastsearch_value == -1 && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
834 $add_save_lastsearch_values = 1;
836 if ($add_save_lastsearch_values) {
837 $url .=
'&save_lastsearch_values=1';
842 if (empty($notooltip)) {
843 if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
844 $langs->load(
"users");
845 $label = $langs->trans(
"ShowGroup");
846 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1, 1).
'"';
848 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
849 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
852 $linkstart =
'<a href="'.$url.
'"';
853 $linkstart .= $linkclose.
'>';
856 $result = $linkstart;
858 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'"'), 0, 0, $notooltip ? 0 : 1);
860 if ($withpicto != 2) {
861 $result .= $this->name;
866 $hookmanager->initHooks(array(
'groupdao'));
867 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result);
868 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
870 $result = $hookmanager->resPrint;
872 $result .= $hookmanager->resPrint;
895 $dn = $conf->global->LDAP_KEY_GROUPS.
"=".$info[$conf->global->LDAP_KEY_GROUPS].
",".$conf->global->LDAP_GROUP_DN;
898 $dn = $conf->global->LDAP_GROUP_DN;
901 $dn = $conf->global->LDAP_KEY_GROUPS.
"=".$info[$conf->global->LDAP_KEY_GROUPS];
922 $info[
"objectclass"] = explode(
',', $conf->global->LDAP_GROUP_OBJECT_CLASS);
925 if ($this->
name && !empty($conf->global->LDAP_GROUP_FIELD_FULLNAME)) {
926 $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->name;
929 if ($this->note && !empty($conf->global->LDAP_GROUP_FIELD_DESCRIPTION)) {
932 if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS)) {
933 $valueofldapfield = array();
934 foreach ($this->members as $key => $val) {
935 $muser =
new User($this->db);
936 $muser->fetch($val->id);
937 $info2 = $muser->_load_ldap_info();
938 $valueofldapfield[] = $muser->_load_ldap_dn($info2);
940 $info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield) ? $valueofldapfield :
'');
942 if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPID)) {
943 $info[$conf->global->LDAP_GROUP_FIELD_GROUPID] = $this->id;
958 global $conf, $user, $langs;
962 $this->
ref =
'SPECIMEN';
965 $this->
name =
'DOLIBARR GROUP SPECIMEN';
966 $this->note =
'This is a note';
967 $this->datec = time();
971 $this->members = array(
987 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
989 global $conf, $user, $langs;
991 $langs->load(
"user");
995 if (!empty($conf->global->USERGROUP_ADDON_PDF)) {
996 $modele = $conf->global->USERGROUP_ADDON_PDF;
1002 $modelpath =
"core/modules/usergroup/doc/";
1004 return $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1018 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1020 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1021 $return .=
'<div class="info-box info-box-sm">';
1022 $return .=
'<span class="info-box-icon bg-infobox-action">';
1024 $return .=
'</span>';
1025 $return .=
'<div class="info-box-content">';
1026 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
1027 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1028 if (property_exists($this,
'members')) {
1029 $return .=
'<br><span class="info-box-status opacitymedium">'.(empty($this->nb_users) ? 0 : $this->nb_users).
' '.$langs->trans(
'Users').
'</span>';
1031 if (property_exists($this,
'nb_rights')) {
1032 $return .=
'<br><div class="info-box-status margintoponly opacitymedium">'.$langs->trans(
'NbOfPermissions').
' : '.(empty($this->nb_rights) ? 0 : $this->nb_rights).
'</div>';
1034 $return .=
'</div>';
1035 $return .=
'</div>';
1036 $return .=
'</div>';
Parent class of all other business classes (invoices, contracts, proposals, orders,...
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
fetchCommon($id, $ref=null, $morewhere='')
Load object in memory from the database.
createCommon(User $user, $notrigger=false)
Create object into database.
deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0)
Delete object in database.
updateCommon(User $user, $notrigger=false)
Update object into database.
call_trigger($triggerName, $user)
Call trigger based on this instance.
Class to manage user groups.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the user card (with optionaly the picto) Use this->id,this->lastname,...
listUsersForGroup($excludefilter='', $mode=0)
Return array of User objects for group this->id (or all if this->id not defined)
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
_load_ldap_info()
Initialize the info array (array of LDAP values) that will be used to call LDAP functions.
_load_ldap_dn($info, $mode=0)
Retourne chaine DN complete dans l'annuaire LDAP pour l'objet.
LibStatut($status, $mode=0)
Return the label of a given status.
delrights($rid, $allmodule='', $allperms='', $entity=0)
Remove a permission from group.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
listGroupsForUser($userid, $load_members=true)
Return array of groups objects for a particular user.
getFullName($langs, $option=0, $nameorder=-1, $maxlen=0)
Return full name (civility+' '+name+' '+lastname)
addrights($rid, $allmodule='', $allperms='', $entity=0)
Add a permission to a group.
initAsSpecimen()
Initialise an instance with random values.
create($notrigger=0)
Create group into database.
getrights($moduletag='')
Charge dans l'objet group, la liste des permissions auquels le groupe a droit.
getLibStatut($mode=0)
Return the label of the status.
fetch($id='', $groupname='', $load_members=false)
Charge un objet group avec toutes ses caracteristiques (except ->members array)
getTooltipContentArray($params)
getTooltipContentArray
__construct($db)
Constructor de la classe.
update($notrigger=0)
Update group into database.
Class to manage Dolibarr users.
dol_string_nohtmltag($stringtoclean, $removelinefeed=1, $pagecodeto='UTF-8', $strip_tags=0, $removedoublespaces=1)
Clean a string from all HTML tags and entities.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dolGetFirstLastname($firstname, $lastname, $nameorder=-1)
Return firstname and lastname in correct order.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
$conf db name
Only used if Module[ID]Name translation string is not found.