From c8a6d629eed73ecb9a07cb1588dfd45e8fb2582d Mon Sep 17 00:00:00 2001 From: DanielnetoDotCom Date: Thu, 26 Nov 2020 10:12:28 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo/issues/4068 --- objects/user.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/objects/user.php b/objects/user.php index 03c6787ed8..7c6b418cfe 100644 --- a/objects/user.php +++ b/objects/user.php @@ -269,7 +269,11 @@ if (typeof gtag !== \"function\") { } } if(empty($users_id)){ - return $name . "_" . uniqid(); + $newChannelName = $name . "_" . uniqid(); + if(strlen($newChannelName)>40){ + $newChannelName = uniqid(); + } + return $newChannelName; } if ($try > 10) { _error_log("User:_recommendChannelName too many tries ({$name}) (" . User::getId() . ") ", AVideoLog::$ERROR);