mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
GLOBALS
This commit is contained in:
parent
97c7d485ff
commit
8fe284ea7d
@ -27,18 +27,16 @@
|
|||||||
{
|
{
|
||||||
function authenticate($username, $passwd)
|
function authenticate($username, $passwd)
|
||||||
{
|
{
|
||||||
global $phpgw_info;
|
|
||||||
|
|
||||||
$domain = yp_get_default_domain();
|
$domain = yp_get_default_domain();
|
||||||
if( !empty($phpgw_info['server']['nis_domain']) )
|
if( !empty($GLOBALS['phpgw_info']['server']['nis_domain']) )
|
||||||
{
|
{
|
||||||
$domain = $phpgw_info['server']['nis_domain'];
|
$domain = $GLOBALS['phpgw_info']['server']['nis_domain'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$map = "passwd.byname";
|
$map = "passwd.byname";
|
||||||
if( !empty($phpgw_info['server']['nis_map']) )
|
if( !empty($GLOBALS['phpgw_info']['server']['nis_map']) )
|
||||||
{
|
{
|
||||||
$map = $phpgw_info['server']['nis_map']);
|
$map = $GLOBALS['phpgw_info']['server']['nis_map']);
|
||||||
}
|
}
|
||||||
$entry = yp_match( $domain, $map, $username );
|
$entry = yp_match( $domain, $map, $username );
|
||||||
|
|
||||||
@ -62,11 +60,9 @@
|
|||||||
|
|
||||||
function update_lastlogin($account_id, $ip)
|
function update_lastlogin($account_id, $ip)
|
||||||
{
|
{
|
||||||
global $phpgw;
|
|
||||||
|
|
||||||
$account_id = get_account_id($account_id);
|
$account_id = get_account_id($account_id);
|
||||||
|
|
||||||
$phpgw->db->query("update phpgw_accounts set account_lastloginfrom='"
|
$GLOBALS['phpgw']->db->query("update phpgw_accounts set account_lastloginfrom='"
|
||||||
. "$ip', account_lastlogin='" . time()
|
. "$ip', account_lastlogin='" . time()
|
||||||
. "' where account_id='$account_id'",__LINE__,__FILE__);
|
. "' where account_id='$account_id'",__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user