<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
protected function getHelp()
{
$help = <<<HELP
-console globalcommunitysilence - Silence remote profile from global community page
+console globalcommunitysilence - Silence a profile from the global community page
Usage
bin/console globalcommunitysilence <profile_url> [-h|--help|-?] [-v]
$contact_id = Contact::getIdForURL($this->getArgument(0));
if ($contact_id) {
- $this->dba->update('contact', ['hidden' => true], ['id' => $contact_id]);
+ Contact::update(['hidden' => true], ['id' => $contact_id]);
$this->out('The account has been successfully silenced from the global community page.');
} else {
throw new RuntimeException('Could not find any public contact entry for this URL (' . $this->getArgument(0) . ')');