LLMS_Events_Core::on_signout()

Record an account.signout event via wp_logout()


Return Return

(LLMS_Event|false) The instance of the LLMS_Event recorded or false when no user was logged in.


Top ↑

Source Source

File: includes/class-llms-events-core.php

	public function on_signout() {

		$uid = get_current_user_id();

		if ( ! $uid ) {
			return false;
		}

		return llms()->events()->record(
			array(
				'actor_id'     => $uid,
				'object_type'  => 'user',
				'object_id'    => $uid,
				'event_type'   => 'account',
				'event_action' => 'signout',
			)
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.5.0 Return false without recording any event if no user was logged in.
3.36.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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