diff --git a/phpgwapi/inc/class.auth_pam.inc.php b/phpgwapi/inc/class.auth_pam.inc.php index 7a4acd02e3..76d3d35f6d 100644 --- a/phpgwapi/inc/class.auth_pam.inc.php +++ b/phpgwapi/inc/class.auth_pam.inc.php @@ -1,44 +1,51 @@ -db->query("update phpgw_accounts set account_lastloginfrom='" - . "$ip', account_lastlogin='" . time() - . "' where account_id='$account_id'",__LINE__,__FILE__); - } - } + if(pam_auth($username, $passwd, &$error)) + { + return True; + } + else + { + return False; + } + } + + function change_password($old_passwd, $new_passwd, $account_id='') + { + // deny password changes. + return( False ); + } + + function update_lastlogin($account_id, $ip) + { + $account_id = get_account_id($account_id); + $GLOBALS['phpgw']->db->query("UPDATE phpgw_accounts SET account_lastloginfrom='" + . "$ip', account_lastlogin='" . time() + . "' WHERE account_id='$account_id'",__LINE__,__FILE__); + } + } ?>