UserSession class [2] - Refactor mod/ files

This commit is contained in:
Philipp 2022-10-20 21:02:49 +02:00
parent a729f3255d
commit bfe68702db
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
25 changed files with 201 additions and 201 deletions

View file

@ -76,10 +76,10 @@ function wall_upload_post(App $a, $desktopmode = true)
$page_owner_nick = $user['nickname'];
$community_page = (($user['page-flags'] == User::PAGE_FLAGS_COMMUNITY) ? true : false);
if ((Session::getLocalUser()) && (Session::getLocalUser() == $page_owner_uid)) {
if ((DI::userSession()->getLocalUserId()) && (DI::userSession()->getLocalUserId() == $page_owner_uid)) {
$can_post = true;
} elseif ($community_page && !empty(Session::getRemoteContactID($page_owner_uid))) {
$contact_id = Session::getRemoteContactID($page_owner_uid);
} elseif ($community_page && !empty(DI::userSession()->getRemoteContactID($page_owner_uid))) {
$contact_id = DI::userSession()->getRemoteContactID($page_owner_uid);
$can_post = DBA::exists('contact', ['blocked' => false, 'pending' => false, 'id' => $contact_id, 'uid' => $page_owner_uid]);
$visitor = $contact_id;
}