[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.13.2.8,1
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.13.2.8,1.121.2.13.2.9 |
Date: |
Sun, 18 May 2003 10:05:18 -0400 |
Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv6764
Modified Files:
Tag: Version-0_9_16-branch
functions.inc.php
Log Message:
got multidomain-login (with and without domain-selectbox) finaly working for
register_globals off
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/functions.inc.php,v
retrieving revision 1.121.2.13.2.8
retrieving revision 1.121.2.13.2.9
diff -C2 -r1.121.2.13.2.8 -r1.121.2.13.2.9
*** functions.inc.php 18 May 2003 10:23:51 -0000 1.121.2.13.2.8
--- functions.inc.php 18 May 2003 14:05:15 -0000 1.121.2.13.2.9
***************
*** 87,125 ****
}
reset($GLOBALS['phpgw_domain']);
! $default_domain = each($GLOBALS['phpgw_domain']);
! $GLOBALS['phpgw_info']['server']['default_domain'] = $default_domain[0];
! unset ($default_domain); // we kill this for security reasons
! $GLOBALS['login'] = @$_POST['login'];
! $GLOBALS['logindomain'] = @$_POST['logindomain'];
!
! $domain = get_var('domain', array('GET', 'COOKIE'), FALSE);
!
! /* This code will handle virtdomains so that is a user logins with
address@hidden, it will switch into virtualization mode. */
! if (isset($domain) && $domain)
! {
! $GLOBALS['phpgw_info']['user']['domain'] = $domain;
! }
! elseif (isset($_POST['login']) && isset($_POST['logindomain']))
{
! if (!ereg ("\@", $_POST['login']))
{
! $GLOBALS['login'] = $_POST['login'] . '@' .
$_POST['logindomain'];
}
! $GLOBALS['phpgw_info']['user']['domain'] =
$_POST['logindomain'];
! unset ($_POST['logindomain']);
}
! elseif (isset($_POST['login']) && !isset($POST['logindomain']))
{
! if (ereg ("\@", $_POST['login']))
! {
! $login_array = explode('@', $_POST['login']);
! $GLOBALS['phpgw_info']['user']['domain'] =
$login_array[1];
! }
! else
! {
! $GLOBALS['phpgw_info']['user']['domain'] =
$GLOBALS['phpgw_info']['server']['default_domain'];
! $GLOBALS['login'] = $_POST['login'] . '@' .
$GLOBALS['phpgw_info']['user']['domain'];
! }
}
--- 87,104 ----
}
reset($GLOBALS['phpgw_domain']);
! list($GLOBALS['phpgw_info']['server']['default_domain']) =
each($GLOBALS['phpgw_domain']);
! if (isset($_POST['login'])) // on login
{
! $GLOBALS['login'] = $_POST['login'];
! if (strstr($GLOBALS['login'],'@') === False)
{
! $GLOBALS['login'] .= '@' .
get_var('logindomain',array('POST'),$GLOBALS['phpgw_info']['server']['default_domain']);
}
! list(,$GLOBALS['phpgw_info']['user']['domain']) =
explode('@',$GLOBALS['login']);
}
! else // on "normal" pageview
{
! $GLOBALS['phpgw_info']['user']['domain'] = get_var('domain',
array('GET', 'COOKIE'), FALSE);
}
***************
*** 145,149 ****
unset ($GLOBALS['phpgw_domain']); // we kill this for security
reasons
}
- unset ($domain); // we kill this to save memory
print_debug('domain',@$GLOBALS['phpgw_info']['user']['domain'],'api');
--- 124,127 ----
***************
*** 276,282 ****
if (@$_POST['login'] != '')
{
! $login_array = explode("@",$_POST['login']);
! print_debug('LID',$login_array[0],'app');
! $login_id =
$GLOBALS['phpgw']->accounts->name2id($login_array[0]);
print_debug('User ID',$login_id,'app');
$GLOBALS['phpgw']->accounts->accounts($login_id);
--- 254,260 ----
if (@$_POST['login'] != '')
{
! list($login) = explode("@",$_POST['login']);
! print_debug('LID',$login,'app');
! $login_id =
$GLOBALS['phpgw']->accounts->name2id($login);
print_debug('User ID',$login_id,'app');
$GLOBALS['phpgw']->accounts->accounts($login_id);
***************
*** 294,299 ****
if (! $GLOBALS['phpgw']->session->verify())
{
! Header('Location: ' .
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->session->link('/login.php','cd=10')));
! exit;
}
--- 272,276 ----
if (! $GLOBALS['phpgw']->session->verify())
{
! $GLOBALS['phpgw']->redirect_link('/login.php','cd=10');
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121.2.13.2.8,1.121.2.13.2.9,
Ralf Becker <address@hidden> <=