me traigo todos los cambios del recuperar cuenta y set email respaldo
This commit is contained in:
@@ -11,6 +11,28 @@ namespace Modelo;
|
||||
|
||||
public class RepositorioUsuarios : RepositorioBase<RepositorioUsuarios>
|
||||
{
|
||||
public (bool, long) Check2fa(string Email, string Pin)
|
||||
{
|
||||
var con = Context;
|
||||
var cli = con.Clientes.FirstOrDefault(x => x.Email == Email);
|
||||
if (cli == null || cli.F2a == null) return (false, 0);
|
||||
|
||||
if (cli.F2a != Pin) return (false, 0);
|
||||
|
||||
return (true, cli.Dni);
|
||||
}
|
||||
|
||||
public bool SetF2aPin(string pin, string Email)
|
||||
{
|
||||
if (pin.Length != 6) return false;
|
||||
var con = Context;
|
||||
var cli = con.Clientes.FirstOrDefault(x => x.Email == Email);
|
||||
if (cli == null) return false;
|
||||
|
||||
cli.F2a = pin;
|
||||
//no Necesita logs esto
|
||||
return Guardar(con);
|
||||
}
|
||||
public bool CheckEmailRecuperacion(string Email, string EmailRecuperacion)
|
||||
{
|
||||
var con = Context;
|
||||
|
||||
Reference in New Issue
Block a user