Merge pull request #15173 from frederic34/patch-6
Clean code interface_20_all_Logevents.class.php
This commit is contained in:
commit
f801bc65c8
@ -81,23 +81,20 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
$text .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
$text .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
||||||
$desc = "(UserLogged,".$object->login.")";
|
$desc = "(UserLogged,".$object->login.")";
|
||||||
$desc .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
$desc .= (empty($object->trigger_mesg) ? '' : ' - '.$object->trigger_mesg);
|
||||||
}
|
} elseif ($action == 'USER_LOGIN_FAILED') {
|
||||||
if ($action == 'USER_LOGIN_FAILED') {
|
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
|
||||||
// Initialisation donnees (date,duree,texte,desc)
|
// Initialisation donnees (date,duree,texte,desc)
|
||||||
$text = $object->trigger_mesg; // Message direct
|
$text = $object->trigger_mesg; // Message direct
|
||||||
$desc = $object->trigger_mesg; // Message direct
|
$desc = $object->trigger_mesg; // Message direct
|
||||||
}
|
} elseif ($action == 'USER_LOGOUT') {
|
||||||
if ($action == 'USER_LOGOUT') {
|
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
// Initialisation donnees (date,duree,texte,desc)
|
// Initialisation donnees (date,duree,texte,desc)
|
||||||
$text = "(UserLogoff,".$object->login.")";
|
$text = "(UserLogoff,".$object->login.")";
|
||||||
$desc = "(UserLogoff,".$object->login.")";
|
$desc = "(UserLogoff,".$object->login.")";
|
||||||
}
|
} elseif ($action == 'USER_CREATE') {
|
||||||
if ($action == 'USER_CREATE') {
|
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
@ -136,10 +133,8 @@ class InterfaceLogevents extends DolibarrTriggers
|
|||||||
// Initialisation donnees (date,duree,texte,desc)
|
// Initialisation donnees (date,duree,texte,desc)
|
||||||
$text = $langs->transnoentities("UserDeleted", $object->login);
|
$text = $langs->transnoentities("UserDeleted", $object->login);
|
||||||
$desc = $langs->transnoentities("UserDeleted", $object->login);
|
$desc = $langs->transnoentities("UserDeleted", $object->login);
|
||||||
}
|
} elseif ($action == 'USERGROUP_CREATE') {
|
||||||
|
// Groups
|
||||||
// Groupes
|
|
||||||
elseif ($action == 'USERGROUP_CREATE') {
|
|
||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
// Initialisation donnees (date,duree,texte,desc)
|
// Initialisation donnees (date,duree,texte,desc)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user