Hook is not activated when creating an account
Hello I have created the following test Hook based on the examples.
I have registered it, it gives me correct registration and appears in the list of registered hooks. But it doesn't run when I create an account. The function is now simplified just to see what really jumps. But he doesn't jump. what can happen?
https://imgur.com/a/yQhJo
thanks
#!/usr/bin/perl
# Package this module.
package MyHook;
# Return errors if Perl experiences problems.
use strict;
use warnings;
# Use cPanel's error logging module.
use Cpanel::Logger;
# Instantiate the cPanel logging object.
my $logger = Cpanel::Logger->new();
# Embed hook attributes alongside the action code.
sub describe {
my $hooks = [
{
'category' => 'Whostmgr',
'event' => 'Accounts::Create',
'stage' => 'post',
'hook' => 'MyHook::crearcron',
'exectype' => 'module',
}
];
return $hooks;
}
sub crearcron {
$logger->info("***** SIIIIII *****");
}
I have registered it, it gives me correct registration and appears in the list of registered hooks. But it doesn't run when I create an account. The function is now simplified just to see what really jumps. But he doesn't jump. what can happen?
thanks
Please sign in to leave a comment.
Comments
0 comments