nuveris

Registered
Apr 1, 2008
3
0
51
This is probably asked million times ... what is the settings, or php script to allow users to just enter their login name without the domain address via webmail interface? We currently disabled the popup login feature. (i.e. johndoe, not [email protected]) Is it possible with cpanel? We have upgraded to 11 just this week. :cool:
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
This is probably asked million times ... what is the settings, or php script to allow users to just enter their login name without the domain address via webmail interface? We currently disabled the popup login feature. (i.e. johndoe, not [email protected]) Is it possible with cpanel? We have upgraded to 11 just this week. :cool:
As the same interface serves for all users on the server (not a single domain), this would not be possible via a setting nor should custom coding of the login interface to accommodate this be attempted on a server hosting multiple domains.

An alternative would be to place a login script on a website where users can do this and you automatically append the domain as appropriate. Some quick modifications to our sample PHP script, cpanel-login.phps, should do the trick. You can grab a copy at: http://www.cpanel.net/cpanel-login.phps
 

nuveris

Registered
Apr 1, 2008
3
0
51
Thanks!!!

I implemented the code, but having some problems. OK. I noticed that you remove the "#" to enable the type of login. From the top php script.

#Webmail
$protocol = 'http';
$port = 2095;

but after that I really don't know whatelse to do. I get this message on the address bar after i submit a login.

http://{domain}.com//{domain}.com:2095/login/
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
I implemented the code, but having some problems. OK. I noticed that you remove the "#" to enable the type of login. From the top php script.

#Webmail
$protocol = 'http';
$port = 2095;

but after that I really don't know whatelse to do. I get this message on the address bar after i submit a login.

http://{domain}.com//{domain}.com:2095/login/
The # is an alternative way of denoting a comment in PHP. Be sure to also uncomment the protocol as well (above the port number) as well as make sure all other protocols and port numbers are commented.

If you are unfamiliar with PHP, there are many tutorials on the internet that can assist you, including the official PHP documentation at php.net.
 

nuveris

Registered
Apr 1, 2008
3
0
51
Got it!

I figured it out soon after my last comments. It login well with using the full email address and password. So I assume from your first comment there is no way to just have the username and password entered even with this PHP file you provided? My work around was just auto-fill the "[email protected]" in the field until I figure it out myself.:confused:
 

boy143878

Member
Mar 29, 2008
7
0
51
This script works great for email login. But, if an incorrect user/pass is entered and submitted, you get taken to domain.com:2095/login. Is there a way to make it go back to this script.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
This script works great for email login. But, if an incorrect user/pass is entered and submitted, you get taken to domain.com:2095/login. Is there a way to make it go back to this script.
That was a known bug. I still hear reports about it so I am unsure if the fix is still currently in EDGE and not yet propagated to the other builds.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
11
313
Houston, TX
cPanel Access Level
Root Administrator
I figured it out soon after my last comments. It login well with using the full email address and password. So I assume from your first comment there is no way to just have the username and password entered even with this PHP file you provided? My work around was just auto-fill the "[email protected]" in the field until I figure it out myself.:confused:
It can be done, but that is more a PHP programming issue than a cPanel/WHM API issue.