Case-insensitive email lookup in Telegram auth
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3f2bdc0d47
commit
bd421af05d
@@ -206,12 +206,14 @@ class TelegramBotService
|
||||
|
||||
private function processEmail(string $chatId, string $email, string $nombre): void
|
||||
{
|
||||
$email = strtolower(trim($email));
|
||||
|
||||
if (! filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
$this->send($chatId, "❌ Eso no parece un correo válido. Escríbelo de nuevo:");
|
||||
return;
|
||||
}
|
||||
|
||||
$user = User::where('email', $email)->first();
|
||||
$user = User::whereRaw('LOWER(email) = ?', [$email])->first();
|
||||
|
||||
if (! $user) {
|
||||
$this->setState($chatId, [
|
||||
|
||||
Reference in New Issue
Block a user