From 49885e55e74335a6e2a1135bd00f23b01849ae80 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 10 Apr 2014 09:04:35 -0700 Subject: [PATCH 1/2] [ticket/12380] Sort Remember Me keys by last login time in UCP PHPBB3-12380 --- phpBB/includes/ucp/ucp_profile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index a14f79f9fd..fc1b7153d2 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -672,7 +672,8 @@ class ucp_profile $sql = 'SELECT key_id, last_ip, last_login FROM ' . SESSIONS_KEYS_TABLE . ' - WHERE user_id = ' . (int) $user->data['user_id']; + WHERE user_id = ' . (int) $user->data['user_id'] . ' + ORDER BY last_login'; $result = $db->sql_query($sql); From eb6b877330f5a976c152404f83683bf93fc045ce Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 10 Apr 2014 09:10:01 -0700 Subject: [PATCH 2/2] [ticket/12380] Explicity state the order of sorting for login keys PHPBB3-12380 --- phpBB/includes/ucp/ucp_profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index fc1b7153d2..00b53b6576 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -673,7 +673,7 @@ class ucp_profile $sql = 'SELECT key_id, last_ip, last_login FROM ' . SESSIONS_KEYS_TABLE . ' WHERE user_id = ' . (int) $user->data['user_id'] . ' - ORDER BY last_login'; + ORDER BY last_login ASC'; $result = $db->sql_query($sql);