Add explicit parameter to IHandleUserSession->setvisitorContacts

- Convert some remaining $_SESSION references to object calls
- Address part of https://github.com/friendica/friendica/issues/12486#issuecomment-1428489772
This commit is contained in:
Hypolite Petovan 2023-03-26 19:00:48 -04:00
parent 2fdf39e8b8
commit b268fa60e7
4 changed files with 18 additions and 12 deletions

View file

@ -109,6 +109,8 @@ interface IHandleUserSessions extends IHandleSessions
/**
* Set the session variable that contains the contact IDs for the visitor's contact URL
*
* @param string $my_url
*/
public function setVisitorsContacts();
public function setVisitorsContacts(string $my_url);
}

View file

@ -140,9 +140,9 @@ class UserSession implements IHandleUserSessions
}
/** {@inheritDoc} */
public function setVisitorsContacts()
public function setVisitorsContacts(string $my_url)
{
$this->session->set('remote', Contact::getVisitorByUrl($this->session->get('my_url')));
$this->session->set('remote', Contact::getVisitorByUrl($my_url));
}
/** {@inheritDoc} */