use Friendica\Model\Item;
use Friendica\Model\Post;
use Friendica\Model\Tag;
+use Friendica\Model\User;
use Friendica\Module\Security\Login;
use Friendica\Network\HTTPException;
use Friendica\Util\DateTimeFormat;
}
if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'help') {
- $lang = $a->getUserValue('language');
+ $user = User::getById(local_user());
+
+ $lang = $user['language'];
$default_dir = 'addon/advancedcontentfilter/doc/';
$help_file = 'advancedcontentfilter.md';
use Friendica\Core\Renderer;
use Friendica\Core\Protocol;
use Friendica\Model\Contact;
+use Friendica\Model\User;
function opmlexport_install()
{
'network' => Protocol::FEED
];
$data = Contact::selectToArray([], $condition, ['order' => ['name']]);
+ $user = User::getById(local_user());
$xml = new \DOMDocument( '1.0', 'utf-8' );
$opml = $xml->createElement('opml');
$head = $xml->createElement('head');
$body = $xml->createElement('body');
$outline = $xml->createElement('outline');
- $outline->setAttribute('title', $a->getUserValue('username') . '\'s RSS/Atom contacts');
- $outline->setAttribute('text', $a->getUserValue('username') . '\'s RSS/Atom contacts');
+ $outline->setAttribute('title', $user['username'] . '\'s RSS/Atom contacts');
+ $outline->setAttribute('text', $user['username'] . '\'s RSS/Atom contacts');
foreach($data as $c) {
$entry = $xml->createElement('outline');
use Friendica\App\BaseURL;
use Friendica\Core\Config\IConfig;
use Friendica\Core\PConfig\IPConfig;
+use Friendica\Model\User;
use Friendica\Object\Email;
/**
$sender_email = 'noreply@' . $hostname;
}
+ $user = User::getById(local_user());
+
$subject = 'Friendica - Secure Mail - Test';
$message = 'This is a test message from your Friendica Secure Mail addon.';
// enable addon for test
$pConfig->set(local_user(), 'securemail', 'enable', 1);
- parent::__construct($sitename, $sender_email, $sender_email, $a->getUserValue('email'),
+ parent::__construct($sitename, $sender_email, $sender_email, $user['email'],
$subject, "<p>{$message}</p>", $message,
[], local_user());
}
if (!local_user()) {
return;
}
+
+ $user = User::getById(local_user());
+
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/statusnet/statusnet.css' . '" media="all" />' . "\r\n";
/* * *
* 1) Check that we have a base api url and a consumer key & secret
$s .= '<div id="statusnet-info" ><img id="statusnet-avatar" src="' . $details->profile_image_url . '" /><p id="statusnet-info-block">' . DI::l10n()->t('Currently connected to: ') . '<a href="' . $details->statusnet_profile_url . '" target="_statusnet">' . $details->screen_name . '</a><br /><em>' . $details->description . '</em></p></div>';
}
$s .= '<p>' . DI::l10n()->t('If enabled all your <strong>public</strong> postings can be posted to the associated GNU Social account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.') . '</p>';
- if ($a->getUserValue('hidewall')) {
+ if ($user['hidewall']) {
$s .= '<p>' . DI::l10n()->t('<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to GNU Social will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
}
$s .= '<div id="statusnet-enable-wrapper">';
if (!local_user()) {
return;
}
+
+ $user = User::getById(local_user());
+
DI::page()['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . DI::baseUrl()->get() . '/addon/twitter/twitter.css' . '" media="all" />' . "\r\n";
/* * *
* 1) Check that we have global consumer key & secret
$s .= Renderer::replaceMacros($field_checkbox, [
'$field' => ['twitter-enable', DI::l10n()->t('Allow posting to Twitter'), $enabled, DI::l10n()->t('If enabled all your <strong>public</strong> postings can be posted to the associated Twitter account. You can choose to do so by default (here) or for every posting separately in the posting options when writing the entry.')]
]);
- if ($a->getUserValue('hidewall')) {
+ if ($user['hidewall']) {
$s .= '<p>' . DI::l10n()->t('<strong>Note</strong>: Due to your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted.') . '</p>';
}
$s .= Renderer::replaceMacros($field_checkbox, [