The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User Log In using cPanel credentials

Discussion in 'cPanel Developers' started by skinnybill, May 12, 2015.

  1. skinnybill

    skinnybill Registered

    Joined:
    May 12, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm looking to write some simple billing software for my server, and was wondering if there was a way to allow users to log in to the billing software using their cPanel credentials?

    Basically, if they visit the billing link but aren't logged in to cPanel, then they are prompted to log in to cPanel, otherwise they will see the billing software for their account.

    Is this possible using either the cPanel or WHM API? I don't think i'm looking for creating sessions here, i'm just looking to check if they're already logged in, and get their username. I'm not planning anything fancier for now, so I'm not going to need to make any other API calls in my software (eg, i'm not looking to automatically suspend accounts etc)


    Is this sort of thing possible, or will I need to make separate logins or integrate my software directly into cPanel?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. skinnybill

    skinnybill Registered

    Joined:
    May 12, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator

    This seems to be what I was looking for. I did check this page but completely missed this section before. Thanks for pointing this out.

    May I add however, than the "Secure Remote Logins" section only has a Perl example and not a PHP one?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I don't believe we offer a specific example of this with PHP, but you should be able to review the Perl example for an understanding of how secure remote logins work. Also, this thread may help:

    PHP Code for automatic login to webmail

    Thank you.
     
Loading...

Share This Page