1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-05-06 17:04:04 +00:00

Use parameter binding in SELECT queries

This commit is contained in:
lukinovec 2026-04-29 10:21:47 +02:00
parent 808f52765c
commit ad7d229daf
8 changed files with 10 additions and 10 deletions

View file

@ -53,6 +53,6 @@ class PermissionControlledMySQLDatabaseManager extends MySQLDatabaseManager impl
public function userExists(string $username): bool
{
return (bool) $this->connection()->select("SELECT count(*) FROM mysql.user WHERE user = '$username'")[0]->{'count(*)'};
return (bool) $this->connection()->select("SELECT count(*) FROM mysql.user WHERE user = ?", [$username])[0]->{'count(*)'};
}
}