From b000e7f665a494088aab746ccc0ab4d85d91a7e5 Mon Sep 17 00:00:00 2001 From: nickpons666 Date: Sat, 31 Jan 2026 02:23:45 -0600 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20de=20b=C3=BAsqueda=20por=20no?= =?UTF-8?q?mbre:=20inclusi=C3=B3n=20del=20rol=20coordinador=20en=20el=20fi?= =?UTF-8?q?ltro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/TelegramBot.php | 2 +- bot/webhook.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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");