Central Login

wellis

New member
Joined
Feb 25, 2010
Messages
2
We are starting a new web hosting niche to go with our website design company. Our website deisgn is running and 5 years successful. This there fore is a new venture we are keeping separate.

We are using Direct Admin for the first time. We are wanting to:
- make one custom login for all our clients.
- when they login they will be taken to there account
- want it to work with multiple servers is this possible? at first it will be one server.
- the direct admin login is very basic and ugly we have already changed the skin and customized quite a bit so now the login screen is needed.

Anyone have suggestions? We have read through the forums but info seemed splotchy and not a "for dummies" type of approach. Can someone maybe give some suggestions with a numbered or bullett point list that can be easily followed without going off on a rabbit trail in between the points?

Thanks so much!
 
To do this for one server is easy. The Knowledgebase has the answer for that so I will not answer it here.

For multiple servers however its more complicated. First your clients will need to be in a database of some sort with there username and server information.

Create your login form and it should be submitted to the program you write below.

You will need to write a program to first query the database for the username that was submitted so that you can automatically find out which server they are supposed to be accessing.

The program needs to output a form to the browser that is automatically submitted via javascript onload.

That is how I do it.
 
Floyd,

Did you automate additions to the database whenever a new user is created/deleted? If so can you give us some idea as to an easy way to manage it?

Thanks.

Jeff
 
I am using WHMCS which of course is central database that has all the information already whenever you use it to create and delete users. If you add and delete users with DirectAdmin then that database is not kept up to date.

However you can use the directadmin post scripts to automate the process of adding and deleting users to the database.

Do you need actual code or theory?
 
Just a swift kick at the moment. And you just gave me that. :D

I'm going to look into WHMCS.

Thanks!

Jeff
 
I have formed a sort of love hate relationship with WHMCS. Its the best thing out there but its really too much for me. But I don't hate it enough to write my own system yet. If it starts getting too bloated like some of the others then I may write my own.
 
More Info

This is a new arena of thinking for me so if you could send me more specific code it would be great. I am using WHMCS as well so that is already in place... I would like to add a login page on my website that would force the user to come to our site to login to their control panel.

  • It will help or seo efforts by more traffic coming on a regular basis
  • It will look more professional
  • It gives opportunities to sell other services
  • It keeps the customer connected to us at all times without the feeling that they are off on an island somewhere.


Thanks for your help! I would even be willing to pay someone to set this up for me if someone existed out there that would do it and make sure it works...
 
To do this for one server is easy. The Knowledgebase has the answer for that so I will not answer it here.

For multiple servers however its more complicated. First your clients will need to be in a database of some sort with there username and server information.

Create your login form and it should be submitted to the program you write below.

You will need to write a program to first query the database for the username that was submitted so that you can automatically find out which server they are supposed to be accessing.

The program needs to output a form to the browser that is automatically submitted via javascript onload.

That is how I do it.

Hi Flyod,

I checked out your site, this is exactly what I would like todo with whmcs. Did you write this in Perl ? I suppose this can also be done in PHP ?

thanks for the info!
 
Yes I wrote it in perl. The way I did it I was to query the whmcs database directly. They may have an api function for it now.
 
I would even be willing to pay someone to set this up for me if someone existed out there that would do it and make sure it works...

I am not cheap because my time is limited. You can send me an email if you want.
 
Yes I wrote it in perl. The way I did it I was to query the whmcs database directly. They may have an api function for it now.

ok. So are you just getting the server information from whms db and forwarding user to that DA login screen ? or are you logging them in directly to their DA server ?

I did not see any API function pertaining to this but i did find the tables and information in the whmcs db, nice!

thanks
 
I have perl print to the browser the custom login page with the server ip in the form action and the username and password already filled out and then use a javascript onload function to autosubmit the login so the customer may see the login screen for a brief moment before they are actually logged in.
 
Hi Flyod,

I am wondering if its possible to do it this way;

have a first step where user inputs domain name. when they click next it brings them to the DA login screen. What happened behind the scenes at that moment was that we connected to whmcs db to find the DA login server for that domain.

so when clicking next on the first step we would be redirecting them to the correct DA server login page. I guess its more of a redirect.

thanks!
 
That is a two step process and it also depends on them entering a certain domain associated with their account even if they do not use that domain anymore. They may even have deleted that domain from DirectAdmin.

Personally I do not have domains associated with the accounts in WHMCS.

Having the enter their username and password is assured to work as long as they did not change their password via DirectAdmin instead of using WHMCS to do it.
 
That is a two step process and it also depends on them entering a certain domain associated with their account even if they do not use that domain anymore. They may even have deleted that domain from DirectAdmin.

Personally I do not have domains associated with the accounts in WHMCS.

Having the enter their username and password is assured to work as long as they did not change their password via DirectAdmin instead of using WHMCS to do it.

ok starting to understand how your doing it. So your looking up the user in whmcs to see on what server they are on and forwarding the login credentials to the proper DA server ?

thx
 
The resulting page prints the form with the form action pointing to the correct server and the username and password filled out based on their input. Then the javascript onload function auto submits the form.
 
Back
Top