Roundcube Community Forum

 

Dropdown domain names in login?

Started by providence, January 29, 2014, 01:15:37 AM

Previous topic - Next topic

providence

Just wondering is there a way to have a list of domains names in the login?
I have 3 domain names but they are all linked to 1 IMAP server. I just need a way to have a dropdown to choose the domain so that
the users wont have to type their domain name everytime they login.

Thanks in advanced

providence

can anyone tell me how I can modify the login page? maybe I can just edit the HTML file and add the drop down menu?

ABerglund

OK, the login page templates folder inside whichever skin you have selected to be default, named login.html.

But you should be able to have a list of domains by declaring them in the default_host parameter. Here's the description from the base config file, note the second and third lines in the comments:

// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = 'localhost';
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

providence

Quote from: ABerglund on February 06, 2014, 11:07:07 PM
OK, the login page templates folder inside whichever skin you have selected to be default, named login.html.

But you should be able to have a list of domains by declaring them in the default_host parameter. Here's the description from the base config file, note the second and third lines in the comments:

// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = 'localhost';


I tried that one before. I used an array as suggested by someone in the forums. However the list didnt show up.

providence

okay now I was able to make the list of server show.
my problem is, i want users to login without @domain.com

what I did so far.

$config['default_host'] = array('domain1.com','domain2.com');


how do I make them choose a domain then login without typing @domain1.com or @domain2.com