From 78fbb1d00e6c5bed6e1c7ab0ca31f084a09fc778 Mon Sep 17 00:00:00 2001 From: 0x7d5 <86822737+VladimirLapskiy@users.noreply.github.com> Date: Mon, 13 Sep 2021 23:54:35 +0500 Subject: [PATCH] User: fixed a bug that allowed the date of birth to be set later than the present --- Web/Presenters/UserPresenter.php | 2 +- Web/Presenters/templates/User/Edit.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index fae120c0..6e7f266d 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -102,7 +102,7 @@ final class UserPresenter extends OpenVKPresenter $user->setLast_Name(empty($this->postParam("last_name")) ? "" : $this->postParam("last_name")); $user->setPseudo(empty($this->postParam("pseudo")) ? NULL : $this->postParam("pseudo")); $user->setStatus(empty($this->postParam("status")) ? NULL : $this->postParam("status")); - if (strtotime($this->postParam("birthday")) > 10) + if (strtotime($this->postParam("birthday")) < time()) $user->setBirthday(strtotime($this->postParam("birthday"))); if ($this->postParam("marialstatus") <= 8 && $this->postParam("marialstatus") >= 0) diff --git a/Web/Presenters/templates/User/Edit.xml b/Web/Presenters/templates/User/Edit.xml index 02c9a78c..9712d728 100644 --- a/Web/Presenters/templates/User/Edit.xml +++ b/Web/Presenters/templates/User/Edit.xml @@ -135,7 +135,7 @@ День рождения: