diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index b4fa7133bff..bc9f5ca1fcc 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -67,9 +67,9 @@ class Events // extends CommonObject // List of all Audit/Security events supported by triggers var $eventstolog=array( - array('id'=>'USER_LOGIN', 'test'=>1), + /*array('id'=>'USER_LOGIN', 'test'=>1), array('id'=>'USER_LOGIN_FAILED', 'test'=>1), - array('id'=>'USER_LOGOUT', 'test'=>1), + array('id'=>'USER_LOGOUT', 'test'=>1),*/ array('id'=>'USER_CREATE', 'test'=>1), array('id'=>'USER_MODIFY', 'test'=>1), array('id'=>'USER_NEW_PASSWORD', 'test'=>1), diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index 5bddfe2fd43..c08df837eb2 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -60,7 +60,7 @@ class InterfaceLogevents extends DolibarrTriggers $date = dol_now(); // Actions - if ($action == 'USER_LOGIN') + /*if ($action == 'USER_LOGIN') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); @@ -87,7 +87,7 @@ class InterfaceLogevents extends DolibarrTriggers // Initialisation donnees (date,duree,texte,desc) $text="(UserLogoff,".$object->login.")"; $desc="(UserLogoff,".$object->login.")"; - } + }*/ if ($action == 'USER_CREATE') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ce157beff0d..84ddec40049 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -736,7 +736,7 @@ if (! defined('NOLOGIN')) { $db->rollback(); session_destroy(); - dol_print_error($db,'Error in some hooks afterLogin (or old trigger USER_LOGIN)'); + dol_print_error($db,'Error in some hooks afterLogin'); exit; } else diff --git a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php index b325f2f7443..1935054893b 100644 --- a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php +++ b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php @@ -113,11 +113,6 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers //case 'USER_SETINGROUP': //case 'USER_REMOVEFROMGROUP': - //case 'USER_LOGIN': - //case 'USER_LOGIN_FAILED': - //case 'USER_LOGOUT': - //case 'USER_UPDATE_SESSION': // Warning: To increase performances, this action is triggered only if constant MAIN_ACTIVATE_UPDATESESSIONTRIGGER is set to 1. - // Actions //case 'ACTION_MODIFY': //case 'ACTION_CREATE': diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index 0d7cabba4e4..4250465ff09 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -42,10 +42,11 @@ if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuse global $conf, $langs, $user; // Appel des triggers -include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; -$interface=new Interfaces($db); -$result=$interface->run_triggers('USER_LOGOUT',$user,$user,$langs,$conf); -if ($result < 0) { $error++; } +// TODO @deprecated Remove this. Hook must be used, not this trigger. +//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; +//$interface=new Interfaces($db); +//$result=$interface->run_triggers('USER_LOGOUT',$user,$user,$langs,$conf); +//if ($result < 0) { $error++; } // Fin appel triggers // Hooks on logout