Users: Remove @ from the beginning of the Telegram account name when saving it

This commit is contained in:
Maxim Leshchenko 2021-11-23 01:30:49 +02:00
parent d782dd055a
commit ab231aa55f
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -156,7 +156,7 @@ final class UserPresenter extends OpenVKPresenter
}
} elseif($_GET['act'] === "contacts") {
$user->setEmail_Contact(empty($this->postParam("email_contact")) ? NULL : $this->postParam("email_contact"));
$user->setTelegram(empty($this->postParam("telegram")) ? NULL : $this->postParam("telegram"));
$user->setTelegram(empty($this->postParam("telegram")) ? NULL : ltrim($this->postParam("telegram"), "@"));
$user->setCity(empty($this->postParam("city")) ? NULL : $this->postParam("city"));
$user->setAddress(empty($this->postParam("address")) ? NULL : $this->postParam("address"));