Simplifications
This commit is contained in:
parent
8402450101
commit
04b6f00ca9
|
@ -1850,11 +1850,9 @@ class Contact
|
||||||
$ret['forum'] = false;
|
$ret['forum'] = false;
|
||||||
$ret['prv'] = false;
|
$ret['prv'] = false;
|
||||||
$ret['contact-type'] = $ret['account-type'];
|
$ret['contact-type'] = $ret['account-type'];
|
||||||
if ($ret['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY) {
|
if (($ret['contact-type'] == User::ACCOUNT_TYPE_COMMUNITY) && isset($ret['manually-approve'])) {
|
||||||
if (isset($ret['manually-approve'])) {
|
$ret['forum'] = (bool)!$ret['manually-approve'];
|
||||||
$ret['forum'] = (bool)!$ret['manually-approve'];
|
$ret['prv'] = (bool)!$ret['forum'];
|
||||||
$ret['prv'] = (bool)!$ret['forum'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2121,10 +2119,8 @@ class Contact
|
||||||
$hidden = (($protocol === Protocol::MAIL) ? 1 : 0);
|
$hidden = (($protocol === Protocol::MAIL) ? 1 : 0);
|
||||||
|
|
||||||
$pending = false;
|
$pending = false;
|
||||||
if ($protocol == Protocol::ACTIVITYPUB) {
|
if (($protocol == Protocol::ACTIVITYPUB) && isset($ret['manually-approve'])) {
|
||||||
if (isset($ret['manually-approve'])) {
|
$pending = (bool)$ret['manually-approve'];
|
||||||
$pending = (bool)$ret['manually-approve'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($protocol, [Protocol::MAIL, Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
|
if (in_array($protocol, [Protocol::MAIL, Protocol::DIASPORA, Protocol::ACTIVITYPUB])) {
|
||||||
|
|
Loading…
Reference in a new issue