diff --git a/bot/TelegramBot.php b/bot/TelegramBot.php index d8d67ff..82700b3 100755 --- a/bot/TelegramBot.php +++ b/bot/TelegramBot.php @@ -212,7 +212,7 @@ class TelegramBot { return "Error de conexion."; } - $stmt = $pdo->prepare("SELECT * FROM users WHERE nombre LIKE ? AND rol = 'ayudante' AND activo = 1 LIMIT 1"); + $stmt = $pdo->prepare("SELECT * FROM users WHERE nombre LIKE ? AND (rol = 'ayudante' OR rol = 'coordinador') AND activo = 1 LIMIT 1"); $stmt->execute(["%$nombre%"]); $user = $stmt->fetch(); diff --git a/bot/webhook.php b/bot/webhook.php index 00bb8f8..213222b 100755 --- a/bot/webhook.php +++ b/bot/webhook.php @@ -116,7 +116,7 @@ class TurnoBot { } log_timing("handleUpdate: DB query start"); - $stmt = $pdo->prepare("SELECT * FROM users WHERE (nombre LIKE ? OR username LIKE ?) AND rol = 'ayudante' AND activo = 1 LIMIT 1"); + $stmt = $pdo->prepare("SELECT * FROM users WHERE (nombre LIKE ? OR username LIKE ?) AND (rol = 'ayudante' OR rol = 'coordinador') AND activo = 1 LIMIT 1"); $stmt->execute(["%$text%", "%$text%"]); $user = $stmt->fetch(); log_timing("handleUpdate: DB query end");