Fixed lockout list in ACP under PostgreSQL
authorDan
Fri, 02 Apr 2010 17:43:50 -0400
changeset 1238 56b94bd46968
parent 1237 446f1fad8dd4
child 1241 99b749da5149
Fixed lockout list in ACP under PostgreSQL
plugins/admin/UserManager.php
--- a/plugins/admin/UserManager.php	Fri Apr 02 14:48:15 2010 -0500
+++ b/plugins/admin/UserManager.php	Fri Apr 02 17:43:50 2010 -0400
@@ -1242,8 +1242,8 @@
 		echo '<div class="info-box">' . $lang->get('acphome_msg_lockout_clear_success', array('ip' => htmlspecialchars($ip))) . '</div>';
 	}
 	
-	$q = $db->sql_query('SELECT COUNT(id) AS fail_count, ipaddr, username, timestamp FROM ' . table_prefix . "lockout\n"
-										. "  WHERE timestamp > ( " . time() . " - " . intval(getConfig('lockout_duration', 15)) . "*60 ) GROUP BY ipaddr ORDER BY COUNT(id) DESC, timestamp DESC;");
+	$q = $db->sql_query('SELECT COUNT(id) AS fail_count, ipaddr, username, timestamp FROM ' . table_prefix . "lockout AS l\n"
+								. "  WHERE timestamp > ( " . time() . " - " . intval(getConfig('lockout_duration', 15)) . "*60 ) GROUP BY ipaddr, username, timestamp ORDER BY COUNT(id) DESC, timestamp DESC;");
 	if ( !$q )
 		$db->_die();