mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Actualizacion automatica: 2024-11-18 16:05:01
This commit is contained in:
@ -36,7 +36,8 @@ class UserModel extends ShieldUserModel
|
||||
"last_name" => "required|trim|max_length[150]",
|
||||
'new_pwd' => 'permit_empty|min_length[8]',
|
||||
'new_pwd_confirm' => 'permit_empty|required_with[new_pwd]|matches[new_pwd]',
|
||||
"comments" => "permit_empty|trim|max_length[512]"
|
||||
"comments" => "permit_empty|trim|max_length[512]",
|
||||
'email' => 'required|valid_email|is_unique[auth_identities.secret]',
|
||||
];
|
||||
|
||||
protected $validationMessages = [
|
||||
@ -77,5 +78,11 @@ class UserModel extends ShieldUserModel
|
||||
|
||||
}
|
||||
|
||||
// Método para comprobar si el email ya está registrado
|
||||
public function isEmailUnique($email)
|
||||
{
|
||||
return $this->where('email', $email)->countAllResults() == 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user