Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Prevent_Concurrent_Logins::destroy_all_sessions_but_newest()

Prevent login by destroying all the user’s sessions but the newest.


Return Return

(int) 1 if the kept session is the current one, 0 otherwise.


Top ↑

Source Source

File: includes/class-llms-prevent-concurrent-logins.php

	private function destroy_all_sessions_but_newest() {

		$is_current_session_newest_session = $this->current_user_newest_session_login_time() === $this->current_user_current_session_login_time();

		$is_current_session_newest_session
			?
			wp_destroy_other_sessions()
			:
			wp_destroy_current_session();

		return (int) $is_current_session_newest_session;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.