Jump to content

Retrieve Registrar credentials in registrar hook


Recommended Posts

Hi all,

I wish to perform some registrar API activities in the registrar hooks, but as the hook's vars or params didn't provide credential details, I tried to get direct from DB Capsule and unfortunately noticed the data stored in encrypted format...

Any suggestions to over come this?

TQ.

Best Regards,
Nelson

Link to comment
Share on other sites

14 hours ago, string said:

You need to pass the encrypted string to the DecryptPassword API.

Thanks on the suggestion, will try this out.

4 hours ago, steven99 said:

Using the getRegistrarConfigOptions() function should provide that information in decrypted form -- though have not tested with latest versions.   You may need to include  includes/registrarfunctions.php for that to be available. 

@steven99 Do you have sample code to share the proper way to include these functional pages?  I used to get error and not very familiar on the WHMCS global variables when includes a php page.

 

Thanks you all in advanced.

Link to comment
Share on other sites

For including the file, you need to backtrack to where the file is located from the current directory that the current script is running in.  Can't post the code as the community web filter is blocking it but basically you would either backtrack using __DIR__ with a bunch of "/../../includes" .  There might be a constant or other method to get to the root directory of whmcs but don't recall right off.

 

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated