private static function recoverUser() { $email = Request::req("email"); $bd = new DataBase(); $gestor = new ManageUser($bd); $user = $gestor->get($email); if ($user->getEmail() == $email && $user->getActivo() == 1) { $id = md5(Constant::PEZARANA . $email); $direccion = Server::getEnlaceCarpeta("index.php?id={$id}&email={$email}&action=view&target=cambiarclave"); $direccion = "<a href='{$direccion}'>Recuperar contraseña de: {$email}</a>"; self::viewLogin($direccion, "info"); } else { self::viewLogin("Email incorrecto o usuario inactivo", "danger"); } }
<?php require '../clases/AutoCarga.php'; $bd = new DataBase(); $sesion = new Session(); $gestor = new ManageUser($bd); $sesion->autentificado(); $user = $sesion->getUser(); $error = Request::get("error"); $r = $gestor->desactivar($user->getEmail()); $sesion->destroy(); if ($r == 1) { $id = md5(Constant::PEZARANA . $user->getEmail()); $email = $user->getEmail(); $direccion = Server::getEnlaceCarpeta("phpconfirmar.php?id={$id}&email={$email}"); header("Location: bienvenida.php?direccion={$direccion}"); exit; } header("Location:viewuser.php?r={$r}");
<?php require '../clases/AutoCarga.php'; $bd = new DataBase(); $email = Request::post("email"); $id = md5(Constant::PEZARANA . $email); $direccion = Server::getEnlaceCarpeta("viewcambiar.php?id={$id}&email={$email}"); header("Location: cambiar.php?direccion={$direccion}"); exit; header("Location: viewalta.php?error={$r}");