]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Merge pull request #7988 from friendica/MrPetovan-notice
[friendica.git] / mod / videos.php
index fd40e79c90dcf6c390b18620315ff0d06c7dbe58..4174c7f48a2fed181d9fac8ed88560f4a319ca0f 100644 (file)
@@ -23,7 +23,7 @@ use Friendica\Util\Security;
 
 function videos_init(App $a)
 {
-       if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
+       if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
                return;
        }
 
@@ -51,9 +51,9 @@ function videos_init(App $a)
                $vcard_widget = Renderer::replaceMacros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
-                       '$addr' => defaults($profile, 'addr', ''),
+                       '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$pdesc' => defaults($profile, 'pdesc', ''),
+                       '$pdesc' => $profile['pdesc'] ?? '',
                ]);
 
                // If not there, create 'aside' empty
@@ -111,7 +111,7 @@ function videos_content(App $a)
        // videos/name/video/xxxxx/edit
 
 
-       if (Config::get('system', 'block_public') && !local_user() && !remote_user()) {
+       if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
                notice(L10n::t('Public access denied.') . EOL);
                return;
        }