]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_request.php
Force avatar update for Contact Advanced page
[friendica.git] / mod / dfrn_request.php
index 76ddb09a5f8ac1919ed5c01d951deadd95a893c1..d8ad2bd3a546ac0a22b7501ff3352084b956cf69 100644 (file)
@@ -13,7 +13,6 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Config;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
@@ -63,8 +62,8 @@ function dfrn_request_init(App $a)
  */
 function dfrn_request_post(App $a)
 {
-       if (($a->argc != 2) || (!count($a->profile))) {
-               Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile));
+       if ($a->argc != 2 || empty($a->profile)) {
+               Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ', profile()=' . count($a->profile ?? []));
                return;
        }
 
@@ -227,7 +226,7 @@ function dfrn_request_post(App $a)
         * in $a->argv[1] and we should have their complete info in $a->profile.
         *
         */
-       if (!(is_array($a->profile) && count($a->profile))) {
+       if (empty($a->profile['uid'])) {
                notice(DI::l10n()->t('Profile unavailable.') . EOL);
                return;
        }
@@ -595,8 +594,8 @@ function dfrn_request_content(App $a)
                exit();
        } else {
                // Normal web request. Display our user's introduction form.
-               if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
-                       if (!Config::get('system', 'local_block')) {
+               if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
+                       if (!DI::config()->get('system', 'local_block')) {
                                notice(DI::l10n()->t('Public access denied.') . EOL);
                                return;
                        }