Clarify the effect of "net-publish"

This commit is contained in:
Michael 2020-02-16 15:39:44 +00:00
parent 9182879a00
commit ee6cceba30
11 changed files with 21 additions and 34 deletions

View file

@ -785,7 +785,7 @@ class Contact
$fields['avatar'] = DI::baseUrl() . '/photo/profile/' .$uid . '.' . $file_suffix;
$fields['forum'] = $user['page-flags'] == User::PAGE_FLAGS_COMMUNITY;
$fields['prv'] = $user['page-flags'] == User::PAGE_FLAGS_PRVGROUP;
$fields['unsearchable'] = $user['hidewall'] || !$profile['net-publish'];
$fields['unsearchable'] = !$profile['net-publish'];
// it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
$fields['url'] = DI::baseUrl() . '/profile/' . $user['nickname'];

View file

@ -1136,7 +1136,7 @@ class GContact
'keywords' => $userdata['pub_keywords'],
'birthday' => $userdata['dob'], 'photo' => $userdata['photo'],
"notify" => $userdata['notify'], 'url' => $userdata['url'],
"hide" => ($userdata['hidewall'] || !$userdata['net-publish']),
"hide" => !$userdata['net-publish'],
'nick' => $userdata['nickname'], 'addr' => $userdata['addr'],
"connect" => $userdata['addr'], "server_url" => DI::baseUrl(),
"generation" => 1, 'network' => Protocol::DFRN];

View file

@ -392,7 +392,7 @@ class Profile
$diaspora = [
'guid' => $profile['guid'],
'podloc' => DI::baseUrl(),
'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false'),
'searchable' => ($profile['net-publish'] ? 'true' : 'false'),
'nickname' => $profile['nickname'],
'fullname' => $profile['name'],
'firstname' => $firstname,

View file

@ -616,8 +616,7 @@ class User
$verified = !empty($data['verified']);
$language = !empty($data['language']) ? Strings::escapeTags(trim($data['language'])) : 'en';
$publish = !empty($data['profile_publish_reg']);
$netpublish = $publish && DI::config()->get('system', 'directory');
$netpublish = $publish = !empty($data['profile_publish_reg']);
if ($password1 != $confirm) {
throw new Exception(DI::l10n()->t('Passwords do not match. Password unchanged.'));