[Vtigercrm-commits] [vtiger-commits] r6136 - /vtigercrm/trunk/modules/Users/LoginHistory.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 17 16:44:35 EDT 2006
Author: allanbush
Date: Wed May 17 14:44:31 2006
New Revision: 6136
Log:
Fixed listing of login history. Refs #752.
Modified:
vtigercrm/trunk/modules/Users/LoginHistory.php
Modified: vtigercrm/trunk/modules/Users/LoginHistory.php
==============================================================================
--- vtigercrm/trunk/modules/Users/LoginHistory.php (original)
+++ vtigercrm/trunk/modules/Users/LoginHistory.php Wed May 17 14:44:31 2006
@@ -86,17 +86,20 @@
{
// Determine if the account name is present in the where clause.
global $current_user;
- $query = "SELECT user_name,user_ip,".$this->db->getDBDateString("login_time")." login_time,".$this->db->getDBDateString("logout_time")." logout_time,status FROM $this->table_name ";
+ $query = "SELECT user_name,user_ip, status,
+ ".$this->db->getDBDateString("login_time")." AS login_time,
+ ".$this->db->getDBDateString("logout_time")." AS logout_time
+ FROM ".$this->table_name;
if($where != "")
{
if(!is_admin($current_user))
- $where .=" and user_name = '".$current_user->user_name."'";
- $query .= "where ($where)";
+ $where .=" AND user_name = '".$current_user->user_name."'";
+ $query .= " WHERE ($where)";
}
else
{
if(!is_admin($current_user))
- $query .= "where user_name = '".$current_user->user_name."'";
+ $query .= " WHERE user_name = '".$current_user->user_name."'";
}
if(!empty($order_by))
More information about the vtigercrm-commits
mailing list