A WordPress-centric search engine for devs and theme authors



is_user_logged_in ›

Since2.0.0
Deprecatedn/a
is_user_logged_in ( No parameters )
Returns:
  • (bool) True if user is logged in, false if not logged in.
Defined at:
Codex:

Checks if the current visitor is a logged in user.



Source

function is_user_logged_in() {
		$user = wp_get_current_user();

		return $user->exists();
	}
endif;

if ( ! function_exists( 'auth_redirect' ) ) :