use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
+use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\User;
return;
}
- if (($a->argc > 1) && ($a->argv[1] == 'connectors'))
- {
+ if (($a->argc > 1) && ($a->argv[1] == 'connectors')) {
check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors');
if (x($_POST, 'general-submit')) {
$err = '';
- $name_change = false;
-
if ($username != $a->user['username']) {
- $name_change = true;
if (strlen($username) > 40) {
$err .= L10n::t(' Please use a shorter name.');
}
intval(local_user())
);
-
- if ($name_change) {
- q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `self`",
- dbesc($username),
- dbesc(DateTimeFormat::utcNow()),
- intval(local_user())
- );
- }
+ Contact::updateSelfFromUserID(local_user());
if (($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) {
// Update global directory in background
if (strlen(Config::get('system', 'directory'))) {
$profile_in_net_dir = replace_macros($opt_tpl, [
- '$field' => ['profile_in_netdirectory', L10n::t('Publish your default profile in the global social directory?'), $profile['net-publish'], L10n::t('Your profile will be publishedin this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', System::baseUrl().'/directory'), [L10n::t('No'), L10n::t('Yes')]]
+ '$field' => ['profile_in_netdirectory', L10n::t('Publish your default profile in the global social directory?'), $profile['net-publish'], L10n::t('Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', System::baseUrl().'/directory'), [L10n::t('No'), L10n::t('Yes')]]
]);
} else {
$profile_in_net_dir = '';