Retrieve User NVData from Standardized Hook
Hi,
I have a need to retrieve a users nvdata entries when operating a number of hooks, is there a way I can do that?
Once such hook is Whostmgr::Accounts::Modify
Using perl modules as well, fyi.
I thought this code would be close to what I need, except I assume need to specify username as well?
my $filename = 'test123';
my $nvData = Cpanel::API::execute( 'NVData', 'get', { 'names' => $filename } );
Many thanks in advance.
Craig
-
Hi, Usually, you need to call Cpanel::initcp before calling any API calls in the Cpanel or Cpanel::API name spaces. Something like: use Cpanel; my $cpanel = Cpanel->new(); $cpanel->initcp( "cpanel_user_name");0
Please sign in to leave a comment.
Comments
1 comment