Extremely huge thanks !
It works.
Handle add ldap user event
Collapse
X
-
I haven't tried, but I found this. On 702 line of Espo\Core\Authentication.php hook manager is used to trigger one of these hooks: ['app', 'authentication', 'onSuccessHookClassNameList'] or ['app', 'authentication', 'onSuccessByTokenHookClassNameList'].
You can define your custom hooks and retrieve user from passed params. Then you can check whether it is ldap user and whether it was just created by utilizing createdAt fieldLast edited by a.slyzhko; 07-19-2024, 07:33 PM.Leave a comment:
-
Handle add ldap user event
Please, I whant to execute some code when new ldap user loged in.
Idea was to add user entity hook, but it does not work cause of
ldaplogin.php:
$this->entityManager->saveEntity($user, [
// Prevent `user` service being loaded by hooks.
SaveOption::SKIP_HOOKS => true,
SaveOption::KEEP_NEW => true,
]);
Is it possible to handle this ?Tags: None

Leave a comment: