Profiles: Add ability to set Hometown

Closes #461
This commit is contained in:
veselcraft 2022-02-07 20:07:03 +03:00
parent 8c44721a1e
commit 33df6ef170
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E
2 changed files with 12 additions and 1 deletions

View file

@ -147,6 +147,9 @@ final class UserPresenter extends OpenVKPresenter
$user->setPseudo(empty($this->postParam("pseudo")) ? NULL : $this->postParam("pseudo"));
$user->setStatus(empty($this->postParam("status")) ? NULL : $this->postParam("status"));
$user->setHometown(empty($this->postParam("hometown")) ? NULL : $this->postParam("hometown"));
if (strtotime($this->postParam("birthday")) < time())
$user->setBirthday(strtotime($this->postParam("birthday")));
@ -185,7 +188,7 @@ final class UserPresenter extends OpenVKPresenter
$user->setCity(empty($this->postParam("city")) ? NULL : $this->postParam("city"));
$user->setAddress(empty($this->postParam("address")) ? NULL : $this->postParam("address"));
$website = $this->postParam("website") ?? "";
if(empty($website))
$user->setWebsite(NULL);

View file

@ -80,6 +80,14 @@
<input type="text" name="status" value="{$user->getStatus()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
<span class="nobold">{_"hometown"}: </span>
</td>
<td>
<input type="text" name="hometown" value="{$user->getHometown()}" />
</td>
</tr>
<tr>
<td width="120" valign="top">
<span class="nobold">{_"relationship"}: </span>