]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
Merge remote-tracking branch 'upstream/2021.09-rc' into user-contact
[friendica.git] / include / api.php
index 7b649da7df80530aa4e423e092bd8e86a9e1d6dc..7758a5eaf2dd02336726fa31f3782fc25896e81f 100644 (file)
@@ -322,7 +322,7 @@ function api_call(App $a, App\Arguments $args = null)
 
                                if (!empty($info['auth']) && api_user() === false) {
                                        api_login($a);
-                                       Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getUserNickname()]);
+                                       Logger::info(API_LOG_PREFIX . 'nickname {nickname}', ['module' => 'api', 'action' => 'call', 'nickname' => $a->getLoggedInUserNickname()]);
                                }
 
                                Logger::debug(API_LOG_PREFIX . 'parameters', ['module' => 'api', 'action' => 'call', 'parameters' => $_REQUEST]);
@@ -3848,7 +3848,7 @@ function api_friendships_destroy($type)
        if ($dissolve) {
                Contact::remove($contact['id']);
        } else {
-               DBA::update('contact', ['rel' => Contact::FOLLOWER], ['id' => $contact['id']]);
+               Contact::update(['rel' => Contact::FOLLOWER], ['id' => $contact['id']]);
        }
 
        // "uid" and "self" are only needed for some internal stuff, so remove it from here
@@ -4504,14 +4504,14 @@ function api_account_update_profile($type)
        if (!empty($_POST['name'])) {
                DBA::update('profile', ['name' => $_POST['name']], ['uid' => $local_user]);
                DBA::update('user', ['username' => $_POST['name']], ['uid' => $local_user]);
-               DBA::update('contact', ['name' => $_POST['name']], ['uid' => $local_user, 'self' => 1]);
-               DBA::update('contact', ['name' => $_POST['name']], ['id' => $api_user['id']]);
+               Contact::update(['name' => $_POST['name']], ['uid' => $local_user, 'self' => 1]);
+               Contact::update(['name' => $_POST['name']], ['id' => $api_user['id']]);
        }
 
        if (isset($_POST['description'])) {
                DBA::update('profile', ['about' => $_POST['description']], ['uid' => $local_user]);
-               DBA::update('contact', ['about' => $_POST['description']], ['uid' => $local_user, 'self' => 1]);
-               DBA::update('contact', ['about' => $_POST['description']], ['id' => $api_user['id']]);
+               Contact::update(['about' => $_POST['description']], ['uid' => $local_user, 'self' => 1]);
+               Contact::update(['about' => $_POST['description']], ['id' => $api_user['id']]);
        }
 
        Profile::publishUpdate($local_user);