New field "manually-approve" for contact table

This commit is contained in:
Michael 2020-09-02 03:02:50 +00:00
parent 31d724e7d8
commit cbf1e5c699
5 changed files with 13 additions and 9 deletions

View file

@ -1802,7 +1802,7 @@ class Contact
// These fields aren't updated by this routine:
// 'xmpp', 'sensitive'
$fields = ['uid', 'avatar', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe',
$fields = ['uid', 'avatar', 'name', 'nick', 'location', 'keywords', 'about', 'subscribe', 'manually-approve',
'unsearchable', 'url', 'addr', 'batch', 'notify', 'poll', 'request', 'confirm', 'poco',
'network', 'alias', 'baseurl', 'gsid', 'forum', 'prv', 'contact-type', 'pubkey', 'last-item'];
$contact = DBA::selectFirst('contact', $fields, ['id' => $id]);
@ -1851,9 +1851,8 @@ class Contact
$ret['prv'] = false;
$ret['contact-type'] = $ret['account-type'];
if ($ret['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
$apcontact = APContact::getByURL($ret['url'], false);
if (isset($apcontact['manually-approve'])) {
$ret['forum'] = (bool)!$apcontact['manually-approve'];
if (isset($ret['manually-approve'])) {
$ret['forum'] = (bool)!$ret['manually-approve'];
$ret['prv'] = (bool)!$ret['forum'];
}
}