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