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.

custom login page...

Discussion in 'cPanel Developers' started by dipp02, Jan 18, 2008.

  1. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I would like to know if it possible or if it is already done to have an special login script that logs clients into the cpanel database but brings them over to a special page (in this case mydbhosts.php) where there will be different options for the user to go into. For example
    1. cpanel, 2. billing center, 3. support center, etc...

    And if they select to go into their control panel it brings them into the cpanel without having to log in all over again....

    Basically, I would like a login form on the frontpage that uses the cpanels login info but then takes the user to that special page (mydbhosts.php) where all different account options are available...

    I hope I was clear.

    If this cannot be done, please let me know.

    Thank You,

    -Dan
     
  2. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    any help with this?
     
  3. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    No one ever heard of something like this?

    or if someone could point me into the right direction that would be great!


    Thanks,
    Dan
     
  4. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    No one has ever heard of this?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you want this to be displayed after the user logs in via the cPanel interface, you will likely need a custom theme for this. Not that the modifications would be significant, but this is beyond the realm of what is currently possible with the Branding Editor.

    Other options you could consider:
    1. Build a cPanel Plugin to add icons to the interface to go to the support or billing sections. If you were willing to forsake the requirement of relaying login credentials, this is a very easy thing to do.

    2. Have users login through a custom page you build. This could be a PHP script that when logged into and the user clicks on the cPanel icon, the user's credentials are then passed to cPanel to login. Of course, users logging in via /cpanel or :2082 will not see this.
     
  6. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    i understand,

    I am thinking about going with #2.

    That is more what i wanted to do.

    I want to make my own custom php page and then if the user clicks on the cpanel link it passes the credentials to the cpanel login.

    But what i am having a problem getting together is how am i going to use the cpanel database (un and pw's) to work with my own custom PHP page?

    Thanks for the response.
     
  7. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    cPanel doesn't maintain its own database for such information. Instead, for cPanel users, it uses standard unix users. There should be a means by which to authenticate unix users via PHP.
     
  8. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Ok,

    How do you suggest I go about doing this? I know basic php ...

    here is the breakdown:
    I have my main site design with hosting packages, web design about us, support, and there is also a custom page called mydbhosts.php

    When the user clicks on mydbhosts.php it will ask for their member username and password. (i would like this to be the cpanel login info or clientexec that they were given. I am also using kayako support suite which I am in the process of installing now)

    When the user logs in with their member un and pw they are then shown links to 'cpanel' 'billing center' and 'support center' and when they click on any of those the credentials are then passed onto them and log in the user automatically.

    So the clients aren’t entering their un and pw numerous times. Basically a portal of account links to all the control panels the user has access to.


    I know this is a lot but i just need a jump start on how to use the cpanel or clientexec username and pw on this custom php page.

    Or if you can think of a better way to show users all their account options and only log in one time throughout the whole site that would be awesome.


    Thank you very much.
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    How do you anticipate keeping the passwords consistent? For example, if someone changes their password via the support system, how will the cPanel and billing passwords be updated etc.?
     
  10. dipp02

    dipp02 Member

    Joined:
    Jan 18, 2008
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    i am going to use loginshare with kayako and use clientexec (the billing center) login info...
     
  11. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    My main concern is how are you going to synchronize those passwords with the appropriate unix/cPanel users?
     
  12. wsenter

    wsenter Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas
    Let me know if you are interested in hiring a developer. I would be more than happy to assist you with this but it would take some time.
     
  13. 6PS-Steven

    6PS-Steven Registered

    Joined:
    Apr 29, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Murfreesboro, TN
    I have a similar question: however, our situation is a little different. I am wanting to setup a custom login system similar to what is being describe here; but the login information would be used from our billing system, which won't be a problem.

    My question is how would I go about passing the correct login credentials to cPanel so they would not be required to enter the information again.

    This would be my first project dealing with cPanel, but I have done some PHP programming in the past.
     
  14. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Some inspiration can be found from how we link to our demos. For your convenience, here is the page I am referencing: http://www.cpanel.net/products/cpwhm/try_cp_whm.htm

    For cPanel, the URL is as follows:
    http://Server:2082/login/?user=Username&pass=Password

    Server can be the server's IP address, hostname or any domain hosted on the server.

    Username and Password are self-explanatory :).

    As far as I know, it should be safe to throw this in a header redirect (more information at www.php.net/header ).
     
  15. 6PS-Steven

    6PS-Steven Registered

    Joined:
    Apr 29, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Murfreesboro, TN
    That's great. I should be able to start work on this a little later on, so I don't know if it works yet.

    A question on this solution though, is there a way to encrypt/encode the password when making the URL call so that it's not in plain text?

    I don't know if there is a way or not, but it is worth a shot to ensure security of a clients information.
     
Loading...

Share This Page