diff --git a/admin/inc/class.admin_ui.inc.php b/admin/inc/class.admin_ui.inc.php index 682fdacf54..bd35dbba40 100644 --- a/admin/inc/class.admin_ui.inc.php +++ b/admin/inc/class.admin_ui.inc.php @@ -58,7 +58,7 @@ class admin_ui 'order' => 'account_lid', 'sort' => 'ASC', 'row_id' => 'account_id', - 'default_cols' => '!account_id,created', + 'default_cols' => '!account_id,created,account_lastlogin,account_lastloginfrom,account_lastpwd_change', 'actions' => self::user_actions(), 'placeholder_actions' => array('add') ); diff --git a/admin/templates/default/index.xet b/admin/templates/default/index.xet index f567b5b270..b2427dfea0 100644 --- a/admin/templates/default/index.xet +++ b/admin/templates/default/index.xet @@ -17,6 +17,9 @@ + + + @@ -29,6 +32,9 @@ + + + @@ -42,6 +48,9 @@ + + + diff --git a/api/src/Accounts/Sql.php b/api/src/Accounts/Sql.php index 43b5a3e456..31b28473ba 100644 --- a/api/src/Accounts/Sql.php +++ b/api/src/Accounts/Sql.php @@ -533,7 +533,8 @@ class Sql $accounts = array(); foreach((array) $this->contacts->search($criteria, array_merge(array(1,'n_given','n_family','id','created','modified',$this->table.'.account_id AS account_id'),$email_cols), - $order,"account_lid,account_type,account_status,account_expires,account_primary_group,account_description", + $order, "account_lid,account_type,account_status,account_expires,account_primary_group,account_description". + ",account_lastlogin,account_lastloginfrom,account_lastpwd_change", $wildcard,false,$query[0] == '!' ? 'AND' : 'OR', $param['offset'] ? array($param['start'], $param['offset']) : (is_null($param['start']) ? false : $param['start']), $filter,$join) as $contact) @@ -555,6 +556,11 @@ class Sql // Api\Contacts::search() returns everything in user-time, need to convert to server-time 'account_created' => Api\DateTime::user2server($contact['created']), 'account_modified' => Api\DateTime::user2server($contact['modified']), + 'account_lastlogin' => $contact['account_lastlogin'] ? + Api\DateTime::user2server($contact['account_lastlogin']) : null, + 'account_lastloginfrom' => $contact['account_lastloginfrom'], + 'account_lastpwd_change' => $contact['account_lastpwd_change'] ? + Api\DateTime::user2server($contact['account_lastpwd_change']) : null, 'account_description' => $contact['account_description'], ); }