]> git.mxchange.org Git - friendica.git/commitdiff
Update profile in directory when calling api_account_update_profile
authorPierre Rudloff <contact@rudloff.pro>
Tue, 26 Dec 2017 00:08:51 +0000 (01:08 +0100)
committerPierre Rudloff <contact@rudloff.pro>
Tue, 26 Dec 2017 00:09:51 +0000 (01:09 +0100)
include/api.php

index 59317fcd319bfc9df99b78d37a56ba6ecdd07095..e2d35d59df9d9542860073918c6303d3db2281d9 100644 (file)
@@ -4498,6 +4498,11 @@ function api_account_update_profile($type)
        }
 
        Worker::add(PRIORITY_LOW, 'ProfileUpdate', api_user());
+       // Update global directory in background
+       $url = $_SESSION['my_url'];
+       if ($url && strlen(Config::get('system', 'directory'))) {
+               Worker::add(PRIORITY_LOW, "Directory", $url);
+       }
 
        return api_account_verify_credentials($type);
 }