mirror of
https://github.com/friendica/friendica
synced 2025-05-01 17:04:25 +02:00
Blocked users need to be blocked
This commit is contained in:
parent
eb2a8e47b0
commit
b61cfd193f
5 changed files with 21 additions and 7 deletions
|
@ -1492,6 +1492,12 @@ class User
|
|||
*/
|
||||
public static function block(int $uid, bool $block = true): bool
|
||||
{
|
||||
$self = Contact::getPublicIdByUserId($uid);
|
||||
if ($block) {
|
||||
Contact::block($self['id']);
|
||||
} else {
|
||||
Contact::unblock($self['id']);
|
||||
}
|
||||
return DBA::update('user', ['blocked' => $block], ['uid' => $uid]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue