mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
18 lines
638 B
PHP
18 lines
638 B
PHP
<?php
|
|
$status_token = Request::encodeStringFromUser($_POST['status_token']);
|
|
$channel_name = null;
|
|
if (isset($_POST['new_preferred_channel'])) {
|
|
$channel_name = Request::encodeStringFromUser($_POST['new_preferred_channel']);
|
|
}
|
|
$email = Request::encodeStringFromUser($_POST['new_email']);
|
|
$sync_consent = isset($_POST['sync_consent']);
|
|
|
|
|
|
if ($channel_name !== "" && $channel_name !== null && !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);
|