From: Tim Düsterhus Date: Thu, 22 Apr 2021 13:47:12 +0000 (+0200) Subject: Merge SessionHandler::getSessions() and ::getUserSessions() X-Git-Tag: 5.4.0_Alpha_1~56 X-Git-Url: https://git.stricted.de/?p=GitHub%2FWoltLab%2FWCF.git;a=commitdiff_plain;h=0ae6fe1e7f05b66c6ee48ae68832416c9a270942 Merge SessionHandler::getSessions() and ::getUserSessions() The split is obsolete give the removal of ACP sessions. see 3dcc6f0cbe6a2b20c10290c1ec46ba6ab8bdafe3 --- diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index e0883c8a14..0452c34871 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -1394,18 +1394,6 @@ final class SessionHandler extends SingletonFactory return $this->firstVisit; } - /** - * Returns all user sessions for a specific user. - * - * @return Session[] - * @throws \InvalidArgumentException if the given user is a guest. - * @since 5.4 - */ - public function getUserSessions(User $user): array - { - return $this->getSessions($user, false); - } - /** * Returns all sessions for a specific user. * @@ -1413,7 +1401,7 @@ final class SessionHandler extends SingletonFactory * @throws \InvalidArgumentException if the given user is a guest. * @since 5.4 */ - private function getSessions(User $user): array + public function getUserSessions(User $user): array { if (!$user->userID) { throw new \InvalidArgumentException("The given user is a guest."); @@ -1434,7 +1422,7 @@ final class SessionHandler extends SingletonFactory } /** - * Deletes the user sessions for a specific user, except the session with the given session id. + * Deletes the sessions for a specific user, except the session with the given session id. * * If the given session id is `null` or unknown, all sessions of the user will be deleted. * @@ -1467,7 +1455,7 @@ final class SessionHandler extends SingletonFactory } /** - * Deletes a user session with the given session ID. + * Deletes a session with the given session ID. * * @since 5.4 */