Jump to content

How to verify WHMCS Admin password on addon page?


DemoTiger

Recommended Posts

Hello,

 

I wish to add admin password verification which will required to enter admin password on a page to access addon page like mycustomaddon.php in admin area.

 

Same as we enter password verification in "Admin >> Configuration".

 

Which code I need to use in my addon to do this?

 

 

Please help.

WHMCS 7.x

 

Thanks,

Kunnu

Link to comment
Share on other sites

Alternatively, you can just verify if the browser is an admin. This is a less intrusive approach. The only time you really want to verify the admin password is if you're changing global, or user settings.

Here's how you can do this, pretty simple, with php

$isadmin = $_SESSION['adminid'];


if (empty($isadmin))
{
        $msg = "You're no administrative user";
        die($msg);


}

 

Edited by twhiting9275
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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