Iāve been trying to add a logic hook after login failed on Users, but I cannot get it to work. I get a blank page after the login failed. The only logic Iām adding to be executed is printing to the log file, but nothing gets added to the log. Has anybody deal with this issue or used this type of hook.
SuiteCRM 7.11.18
Iām adding this:
- /custom/modules/Users/logic_hooks.php
$hook_version = 1;
$hook_array = Array();
$hook_array[ālogin_failedā] = Array();
$hook_array[ālogin_failedā][] = Array(1, ālogin_failedā, ācustom/modules/Users/User_Hooks.phpā, āUser_Hooksā, ālogin_failedā);
- custom/modules/Users/User_Hooks.php
if (!defined(āsugarEntryā) || !sugarEntry) die(āNot A Valid Entry Pointā);
class User_Hooks{
function login_failed($bean, $event, $arguments){
$GLOBALS['log']->fatal('Login failed for user ');
}
}
- Did the repair and rebuild
- If I try to login with the wrong password, I get a blank index page