public function resetearPass($username, $pass, BDCon $BD) { $rs = $BD->stmt("resetPass(:username, :pass_md5);", array("username" => $username, "pass_md5" => md5($pass))); if ($rs) { $usr = $BD->fetch($rs); } else { $usr = false; } if ($usr) { $this->id = encrypt($usr["id"]); $this->username = $usr["username"]; $this->email = $usr["email"]; $this->nivel = $usr["nivel"]; } }
public static function obtMultiples($stmt, $params, BDCon $BD) { $params = $params ? $params : array(); $rs = $BD->stmt($stmt, $params); $objs = array(); while ($res = $BD->fetch($rs)) { $obj = new OpcionMenu($res); $objs[$obj->getId()] = $obj; } return $objs; }