This commit is contained in:
Miles Lott 2001-11-23 19:38:17 +00:00
parent 97c7d485ff
commit 8fe284ea7d

View File

@ -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__);
} }