mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:10:12 +00:00
Merge pull request #3986 from MrPetovan/task/admin-block-list
Admin remote contact block list
This commit is contained in:
commit
2ca03acb45
30 changed files with 736 additions and 387 deletions
|
@ -822,7 +822,33 @@ class Contact extends BaseObject
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Updates the avatar links in a contact only if needed
|
||||
* @brief Blocks a contact
|
||||
*
|
||||
* @param int $uid
|
||||
* @return bool
|
||||
*/
|
||||
public static function block($uid)
|
||||
{
|
||||
$return = dba::update('contact', ['blocked' => true], ['id' => $uid]);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unblocks a contact
|
||||
*
|
||||
* @param int $uid
|
||||
* @return bool
|
||||
*/
|
||||
public static function unblock($uid)
|
||||
{
|
||||
$return = dba::update('contact', ['blocked' => false], ['id' => $uid]);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Updates the avatar links in a contact only if needed
|
||||
*
|
||||
* @param string $avatar Link to avatar picture
|
||||
* @param int $uid User id of contact owner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue