use Friendica\Core\Addon;
use Friendica\Core\Renderer;
use Friendica\Core\Search;
-use Friendica\Core\Session;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Contact;
DI::mode()->has(App\Mode::MAINTENANCEDISABLED)
&& (
$args->get(0) === 'profile' && $args->get(1) === ($a->getLoggedInUserNickname() ?? '')
- || $args->get(0) === 'network' && Session::getLocalUser()
+ || $args->get(0) === 'network' && DI::userSession()->getLocalUserId()
)
) {
vier_community_info();
function get_vier_config($key, $default = false, $admin = false)
{
- if (Session::getLocalUser() && !$admin) {
- $result = DI::pConfig()->get(Session::getLocalUser(), "vier", $key);
+ if (DI::userSession()->getLocalUserId() && !$admin) {
+ $result = DI::pConfig()->get(DI::userSession()->getLocalUserId(), "vier", $key);
if (!is_null($result)) {
return $result;
}
// comunity_profiles
if ($show_profiles) {
- $contacts = Contact\Relation::getSuggestions(Session::getLocalUser(), 0, 9);
+ $contacts = Contact\Relation::getSuggestions(DI::userSession()->getLocalUserId(), 0, 9);
$tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
if (DBA::isResult($contacts)) {
}
//right_aside FIND FRIENDS
- if ($show_friends && Session::getLocalUser()) {
+ if ($show_friends && DI::userSession()->getLocalUserId()) {
$nv = [];
$nv['findpeople'] = DI::l10n()->t('Find People');
$nv['desc'] = DI::l10n()->t('Enter name or interest');
}
//Community_Pages at right_aside
- if ($show_pages && Session::getLocalUser()) {
- $aside['$page'] = ForumManager::widget('network/forum', Session::getLocalUser());;
+ if ($show_pages && DI::userSession()->getLocalUserId()) {
+ $aside['$page'] = ForumManager::widget('network/forum', DI::userSession()->getLocalUserId());;
}
// END Community Page