lbry.com/view/template/acquisition/youtube_edit.php
Niko Storni 54830110e8 fix youtube channel name change
update composer to remove warnings
2019-05-23 17:34:39 +02:00

15 lines
535 B
PHP

<?php
$status_token = Request::encodeStringFromUser($_POST['status_token']);
$channel_name = Request::encodeStringFromUser($_POST['new_preferred_channel']);
$email = Request::encodeStringFromUser($_POST['new_email']);
$sync_consent = isset($_POST['sync_consent']);
if ($channel_name !== "" && !preg_match("/@[A-Za-z0-9-]+$/", $channel_name)) {
$channel_name = "@" . $channel_name;
}
if ($channel_name === ""){
$channel_name = null;
}
AcquisitionActions::actionYoutubeEdit($status_token, $channel_name, $email, $sync_consent);