Move Model\Profile::getMyUrl to UserSessions
This commit is contained in:
parent
6a205b2e10
commit
3865733e18
|
@ -65,6 +65,13 @@ interface IHandleUserSessions extends IHandleSessions
|
|||
*/
|
||||
public function getUserIDForVisitorContactID(int $cid): int;
|
||||
|
||||
/**
|
||||
* Returns the account URL of the currently logged in user
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMyUrl(): string;
|
||||
|
||||
/**
|
||||
* Returns if the current visitor is authenticated
|
||||
*
|
||||
|
|
|
@ -110,6 +110,12 @@ class UserSession implements IHandleUserSessions
|
|||
return array_search($cid, $this->session->get('remote'));
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function getMyUrl(): string
|
||||
{
|
||||
return $this->session->get('my_url', '');
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function isAuthenticated(): bool
|
||||
{
|
||||
|
|
|
@ -679,10 +679,11 @@ class Profile
|
|||
* Retrieves the my_url session variable
|
||||
*
|
||||
* @return string
|
||||
* @deprecated since version 2022.12, please use UserSession->getMyUrl instead
|
||||
*/
|
||||
public static function getMyURL(): string
|
||||
{
|
||||
return DI::session()->get('my_url') ?? '';
|
||||
return DI::userSession()->getMyUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user