UserData::instance( $user_ID )


Source

File: classes/UserData.php

	public static function instance( $user_ID ) {
		static $instance = null;

		// Only run these methods if they haven't been run previously
		if ( null === $instance ) {
			$instance = new self();

			if ( ! is_user_logged_in() ) {
				return $instance;
			}

			$instance->user_id = $user_ID;

			$dozent_user_data    = (array) maybe_unserialize( get_user_meta( $instance->user_id, '_dozent_user_data',
				true ) );
			$instance->user_data = $dozent_user_data;

		}

		// Always return the instance
		return $instance;
	}