Second implementation with matrix_synapse_rest_auth #2

Merged
krombel merged 51 commits from second_implementation into master 2018-03-19 13:57:16 +01:00
Showing only changes of commit b131e6b09e - Show all commits

View File

@@ -281,12 +281,12 @@ class mxDatabase
$term = filter_var($search_term, FILTER_SANITIZE_STRING);
$result = array();
$sql = "SELECT COUNT(*) FROM logins WHERE"
. " localpart LIKE '%" . $term . "%';";
. " localpart LIKE '" . $term . "%';";
$res = $this->db->query($sql);
if ($res->fetchColumn() > 0) {
$sql = "SELECT first_name, last_name, localpart FROM logins WHERE"
. " localpart LIKE '%" . $term . "%';";
. " localpart LIKE '" . $term . "%';";
foreach ($this->db->query($sql) as $row) {
array_push($result, [
"display_name" => $row["first_name"] . " " . $row["last_name"],