changed LoginModel to use HTTP_HOST instead of SERVER_NAME and SERVER_PORT
This commit is contained in:
parent
d033a7af79
commit
d5b787036f
@ -17,7 +17,8 @@ class LoginModel extends Model
|
|||||||
|
|
||||||
function getUser ()
|
function getUser ()
|
||||||
{
|
{
|
||||||
$server1 = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
|
//$server1 = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
|
||||||
|
$server1 = $_SERVER['HTTP_HOST'];
|
||||||
$server2 = $this->session->userdata('server');
|
$server2 = $this->session->userdata('server');
|
||||||
if ($server1 != $server2)
|
if ($server1 != $server2)
|
||||||
{
|
{
|
||||||
@ -55,7 +56,8 @@ class LoginModel extends Model
|
|||||||
|
|
||||||
function authenticate ($userid, $password, $email = '')
|
function authenticate ($userid, $password, $email = '')
|
||||||
{
|
{
|
||||||
$server = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
|
//$server = $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'];
|
||||||
|
$server = $_SERVER['HTTP_HOST'];
|
||||||
|
|
||||||
$sysadmin = FALSE;
|
$sysadmin = FALSE;
|
||||||
$ids = explode (',', CODEPOT_SYSADMIN_USERIDS);
|
$ids = explode (',', CODEPOT_SYSADMIN_USERIDS);
|
||||||
|
@ -31,7 +31,8 @@ function load_ini ($file)
|
|||||||
array ('https_compulsory', 'boolean', FALSE),
|
array ('https_compulsory', 'boolean', FALSE),
|
||||||
array ('https_url', 'string', 'https://${SERVER_NAME}${REQUEST_URI}'),
|
array ('https_url', 'string', 'https://${SERVER_NAME}${REQUEST_URI}'),
|
||||||
array ('api_base_url', 'string', 'http://127.0.0.1'),
|
array ('api_base_url', 'string', 'http://127.0.0.1'),
|
||||||
array ('svn_base_url', 'string', 'http://${SERVER_NAME}:${SERVER_PORT}/svn'),
|
//array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${SERVER_NAME}:${SERVER_PORT}/svn'),
|
||||||
|
array ('svn_base_url', 'string', '${REQUEST_PROTOCOL}://${HTTP_POST}/svn'),
|
||||||
|
|
||||||
array ('login_model', 'string', 'LdapLoginModel'),
|
array ('login_model', 'string', 'LdapLoginModel'),
|
||||||
array ('sysadmin_userids', 'string', ''),
|
array ('sysadmin_userids', 'string', ''),
|
||||||
|
Loading…
Reference in New Issue
Block a user