mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
registration: Added field birthday
This commit is contained in:
parent
81e5f2ae2c
commit
dcdca45045
2 changed files with 13 additions and 1 deletions
|
@ -93,6 +93,9 @@ final class AuthPresenter extends OpenVKPresenter
|
||||||
if(!$chUser)
|
if(!$chUser)
|
||||||
$this->flashFail("err", "Не удалось зарегистрироваться", "Пользователь с таким email уже существует.");
|
$this->flashFail("err", "Не удалось зарегистрироваться", "Пользователь с таким email уже существует.");
|
||||||
|
|
||||||
|
if (!strtotime($this->postParam("birthday")) < time())
|
||||||
|
$this->flashFail("err", "Неверная дата рождения", "Дату рождения, которую вы ввели, не является корректным.");
|
||||||
|
|
||||||
$user = new User;
|
$user = new User;
|
||||||
$user->setUser($chUser->getId());
|
$user->setUser($chUser->getId());
|
||||||
$user->setFirst_Name($this->postParam("first_name"));
|
$user->setFirst_Name($this->postParam("first_name"));
|
||||||
|
@ -101,6 +104,7 @@ final class AuthPresenter extends OpenVKPresenter
|
||||||
$user->setEmail($this->postParam("email"));
|
$user->setEmail($this->postParam("email"));
|
||||||
$user->setSince(date("Y-m-d H:i:s"));
|
$user->setSince(date("Y-m-d H:i:s"));
|
||||||
$user->setRegistering_Ip(CONNECTING_IP);
|
$user->setRegistering_Ip(CONNECTING_IP);
|
||||||
|
$user->setBirthday(strtotime($this->postParam("birthday")));
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
if(!is_null($referer)) {
|
if(!is_null($referer)) {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="POST" enctype="multipart/form-data">
|
<form method="POST" enctype="multipart/form-data">
|
||||||
<table cellspacing="7" cellpadding="0" width="40%" border="0" align="center">
|
<table cellspacing="7" cellpadding="0" width="52%" border="0" align="center">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
@ -54,6 +54,14 @@
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span>{_"birth_date"}: </span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input max={date('Y-m-d')} name="birthday" type="date"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr></tr>
|
<tr></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in a new issue