DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.'));
}
+ User::setCommunityUserSettings(DI::userSession()->getLocalUserId());
DI::baseUrl()->redirect($redirectUrl);
}
$page_flags = User::PAGE_FLAGS_COMMUNITY;
}
- $fields = [];
- $profile_fields = [];
-
- if ($account_type == User::ACCOUNT_TYPE_COMMUNITY) {
- DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'unlisted', true);
-
- $fields = [
- 'allow_cid' => '',
- 'allow_gid' => $page_flags == User::PAGE_FLAGS_PRVGROUP ?
- '<' . Circle::FOLLOWERS . '>'
- : '',
- 'deny_cid' => '',
- 'deny_gid' => '',
- 'blockwall' => true,
- 'blocktags' => true,
- ];
-
- $profile_fields = [
- 'hide-friends' => true,
- ];
- }
-
- $fields = array_merge($fields, [
+ $fields = [
'page-flags' => $page_flags,
'account-type' => $account_type,
- ]);
+ ];
- if (!User::update($fields, DI::userSession()->getLocalUserId()) || !empty($profile_fields) && !Profile::update($profile_fields, DI::userSession()->getLocalUserId())) {
+ if (!User::update($fields, DI::userSession()->getLocalUserId())) {
DI::sysmsg()->addNotice(DI::l10n()->t('Settings were not updated.'));
}
+ User::setCommunityUserSettings(DI::userSession()->getLocalUserId());
DI::baseUrl()->redirect($redirectUrl);
}
'$delete_openid' => ['delete_openid', DI::l10n()->t('Delete OpenID URL'), false, ''],
'$h_basic' => DI::l10n()->t('Basic Settings'),
- '$username' => ['username', DI::l10n()->t('Full Name:'), $username, '', false, 'autocomplete="off"'],
+ '$username' => ['username', DI::l10n()->t('Display name:'), $username, '', false, 'autocomplete="off"'],
'$email' => ['email', DI::l10n()->t('Email Address:'), $email, '', '', 'autocomplete="off"', 'email'],
'$timezone' => ['timezone_select', DI::l10n()->t('Your Timezone:'), Temporal::getTimezoneSelect($timezone), ''],
'$language' => ['language', DI::l10n()->t('Your Language:'), $language, DI::l10n()->t('Set the language we use to show you friendica interface and to send you emails'), $lang_choices],