Update ShowUsuarios.php

This commit is contained in:
Lizandro Guarnizo
2026-06-05 10:17:07 -05:00
parent ca0636f81c
commit 155450b676
+3 -3
View File
@@ -247,12 +247,12 @@ class ShowUsuarios extends Component
$this->validate();
$consulta_user = User::where('email', $this->email)->exists();
$consulta_user = User::where('email', strtolower(trim($this->email)))->exists();
if (!$consulta_user) {
$crear = new User;
$crear->name = $this->nombre;
$crear->email = $this->email;
$crear->email = strtolower(trim($this->email));
$crear->password = Hash::make($this->password);
$crear->rol_id = $this->rol;
$crear->subvendedor_id = Auth::user()->rol->nombre == "super" ? null : Auth::user()->id;
@@ -570,7 +570,7 @@ class ShowUsuarios extends Component
);
User::where('id', $this->id_edit)->update([
'name' => $this->nombre_edit,
'email' => $this->email_edit,
'email' => strtolower(trim($this->email_edit)),
'rol_id' => $this->rol_edit
]);