Author Topic: Dropdown domain names in login?  (Read 4767 times)

Offline providence

  • Newbie
  • *
  • Posts: 8
Dropdown domain names in login?
« on: January 29, 2014, 01:15:37 AM »
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

Offline providence

  • Newbie
  • *
  • Posts: 8
Re: Dropdown domain names in login?
« Reply #1 on: February 06, 2014, 08:31:18 PM »
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?

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: Dropdown domain names in login?
« Reply #2 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:

Code: [Select]
// 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

Offline providence

  • Newbie
  • *
  • Posts: 8
Re: Dropdown domain names in login?
« Reply #3 on: February 07, 2014, 12:03:03 AM »
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:

Code: [Select]
// 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.

Offline providence

  • Newbie
  • *
  • Posts: 8
Re: Dropdown domain names in login?
« Reply #4 on: February 07, 2014, 12:52:02 AM »
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