From ab231aa55f3989a183662e0cf7579537a386f55f Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Tue, 23 Nov 2021 01:30:49 +0200 Subject: [PATCH] Users: Remove @ from the beginning of the Telegram account name when saving it --- Web/Presenters/UserPresenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index e3e1ac38..bff4de2f 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -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"));