fix empty channel names

This commit is contained in:
Niko Storni 2019-02-19 03:34:07 +01:00
parent b19b50788c
commit 4af6396ebf

View file

@ -5,7 +5,7 @@ $email = Request::encodeStringFromUser($_POST['new_email']);
$sync_consent = isset($_POST['sync_consent']);
if (!preg_match("/@[A-Za-z0-9-]+$/", $channel_name)) {
if ($channel_name !== "" && !preg_match("/@[A-Za-z0-9-]+$/", $channel_name)) {
$channel_name = "@" . $channel_name;
}