I seem to be only getting an input box for the password and not for the user name
Script shows login/password or password only box depending on the following option:
// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', true);
In order to redirect to custom subdomain add array of user => subdomain below the array holding passwords. So you should have something like:
##################################################################
# SETTINGS START
##################################################################
// Add login/password pairs below, like described above
// NOTE: all rows except last must have comma "," at the end of line
$LOGIN_INFORMATION = array(
'user1' => 'user1-password',
'admin' => 'admin-password'
);
$SUBDOMAINS = array(
'user1' => 'subdomain1',
'admin' => 'subdomain123'
);
// request login? true - show login and password boxes, false - password box only
define('USE_USERNAME', true);
##################################################################
# SETTINGS END
##################################################################
Than add following at the very bottom of the script, just before the
?> line:
header('Location: http://www.'.$SUBDOMAINS[$login].'.mysite.com'); die();