]> git.mxchange.org Git - friendica.git/commitdiff
Cleaner way to get user URL in api_account_update_profile
authorPierre Rudloff <contact@rudloff.pro>
Tue, 26 Dec 2017 20:49:43 +0000 (21:49 +0100)
committerPierre Rudloff <contact@rudloff.pro>
Tue, 26 Dec 2017 20:50:08 +0000 (21:50 +0100)
include/api.php

index e2d35d59df9d9542860073918c6303d3db2281d9..f52b664aa1f8c7c483b87531b28b1a88d920f2ec 100644 (file)
@@ -4497,11 +4497,10 @@ function api_account_update_profile($type)
                dba::update('contact', ['about' => $_POST['description']], ['id' => $api_user['id']]);
        }
 
-       Worker::add(PRIORITY_LOW, 'ProfileUpdate', api_user());
+       Worker::add(PRIORITY_LOW, 'ProfileUpdate', $local_user);
        // Update global directory in background
-       $url = $_SESSION['my_url'];
-       if ($url && strlen(Config::get('system', 'directory'))) {
-               Worker::add(PRIORITY_LOW, "Directory", $url);
+       if ($api_user['url'] && strlen(Config::get('system', 'directory'))) {
+               Worker::add(PRIORITY_LOW, "Directory", $api_user['url']);
        }
 
        return api_account_verify_credentials($type);