From: Pierre Rudloff Date: Tue, 26 Dec 2017 20:49:43 +0000 (+0100) Subject: Cleaner way to get user URL in api_account_update_profile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8b10bfe3a815676e269570405035e93ff7c230bf;p=friendica.git Cleaner way to get user URL in api_account_update_profile --- diff --git a/include/api.php b/include/api.php index e2d35d59df..f52b664aa1 100644 --- a/include/api.php +++ b/include/api.php @@ -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);