]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact/User.php
Remove deprecated, impossible code for discarding with FID
[friendica.git] / src / Model / Contact / User.php
index eb0b5af096aa73aed342bcb51783703fbc0b082b..05530cccc5a7cdf503bf1c1fbcf1a9551c6cd76f 100644 (file)
@@ -23,6 +23,7 @@ namespace Friendica\Model\Contact;
 
 use Exception;
 use Friendica\Core\Logger;
+use Friendica\Core\Protocol;
 use Friendica\Core\System;
 use Friendica\Database\Database;
 use Friendica\Database\DBA;
@@ -145,6 +146,13 @@ class User
                        return;
                }
 
+               $contact = Contact::getById($cdata['public']);
+               if ($blocked) {
+                       Protocol::block($contact, $uid);
+               } else {
+                       Protocol::unblock($contact, $uid);
+               }
+
                if ($cdata['user'] != 0) {
                        DBA::update('contact', ['blocked' => $blocked], ['id' => $cdata['user'], 'pending' => false]);
                }