diff --git a/phpgwapi/inc/class.auth_http.inc.php b/phpgwapi/inc/class.auth_http.inc.php index cef85fd3b8..1e0572506d 100644 --- a/phpgwapi/inc/class.auth_http.inc.php +++ b/phpgwapi/inc/class.auth_http.inc.php @@ -26,18 +26,24 @@ class auth { + var $previous_login = -1; + function authenticate($username, $passwd) { global $phpgw_info, $phpgw, $PHP_AUTH_USER; - if (isset($PHP_AUTH_USER)) { + if (isset($PHP_AUTH_USER)) + { return True; - } else { + } + else + { return False; } } - function change_password($old_passwd, $new_passwd) { + function change_password($old_passwd, $new_passwd) + { global $phpgw_info, $phpgw; return False; } @@ -47,7 +53,9 @@ { global $phpgw; - $account_id = get_account_id($account_id); + $phpgw->db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); + $phpgw->db->next_record(); + $this->previous_login = $phpgw->db->f('account_lastlogin'); $phpgw->db->query("update phpgw_accounts set account_lastloginfrom='" . "$ip', account_lastlogin='" . time() diff --git a/phpgwapi/inc/class.auth_ldap.inc.php b/phpgwapi/inc/class.auth_ldap.inc.php index 743facacb3..99715ab38f 100644 --- a/phpgwapi/inc/class.auth_ldap.inc.php +++ b/phpgwapi/inc/class.auth_ldap.inc.php @@ -90,9 +90,9 @@ { global $phpgw; - $db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); - $db->next_record(); - $this->previous_login = $db->f('account_lastlogin'); + $phpgw->db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); + $phpgw->db->next_record(); + $this->previous_login = $phpgw->db->f('account_lastlogin'); $now = time(); diff --git a/phpgwapi/inc/class.auth_mail.inc.php b/phpgwapi/inc/class.auth_mail.inc.php index 014cb7bd5f..afdd9a4d6a 100644 --- a/phpgwapi/inc/class.auth_mail.inc.php +++ b/phpgwapi/inc/class.auth_mail.inc.php @@ -75,9 +75,9 @@ { global $phpgw; - $db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); - $db->next_record(); - $this->previous_login = $db->f('account_lastlogin'); + $phpgw->db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); + $phpgw->db->next_record(); + $this->previous_login = $phpgw->db->f('account_lastlogin'); $phpgw->db->query("update phpgw_accounts set account_lastloginfrom='" . "$ip', account_lastlogin='" . time() diff --git a/phpgwapi/inc/class.auth_sqlssl.inc.php b/phpgwapi/inc/class.auth_sqlssl.inc.php index ebf55ee228..7f6e28838e 100644 --- a/phpgwapi/inc/class.auth_sqlssl.inc.php +++ b/phpgwapi/inc/class.auth_sqlssl.inc.php @@ -90,9 +90,9 @@ { global $phpgw; - $db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); - $db->next_record(); - $this->previous_login = $db->f('account_lastlogin'); + $phpgw->db->query("select account_lastlogin from phpgw_accounts where account_id='$account_id'",__LINE__,__FILE__); + $phpgw->db->next_record(); + $this->previous_login = $phpgw->db->f('account_lastlogin'); $phpgw->db->query("update phpgw_accounts set account_lastloginfrom='" . "$ip', account_lastlogin='" . time()