--- a/plugins/login-table.php
+++ b/plugins/login-table.php
@@ -26,7 +26,7 @@
 	
 	function login($login, $password) {
 		$connection = connection();
-		return (bool) $connection->result("SELECT COUNT(*) FROM " . idf_escape($this->database) . ".login WHERE login = " . $connection->quote($login) . " AND password_sha1 = " . $connection->quote(sha1($password)));
+		return (bool) $connection->result("SELECT COUNT(*) FROM " . idf_escape($this->database) . ".login WHERE login = " . q($login) . " AND password_sha1 = " . q(sha1($password)));
 	}
 	
 }