dozent_query_user( $user_id )

Get the user object in database format by User ID


Parameters

$user_id

(Required)


Return

(array|object|void|null)


Source

File: includes/user-functions.php

	function dozent_query_user( $user_id ) {
		global $wpdb;

		$user = $wpdb->get_row( "select ID, display_name, 
			dozent_job_title.meta_value as dozent_profile_job_title, 
			dozent_bio.meta_value as dozent_profile_bio,
			dozent_photo.meta_value as dozent_profile_photo
			
			from {$wpdb->users}
			LEFT JOIN {$wpdb->usermeta} dozent_job_title ON ID = dozent_job_title.user_id AND dozent_job_title.meta_key = '_dozent_profile_job_title'
			LEFT JOIN {$wpdb->usermeta} dozent_bio ON ID = dozent_bio.user_id AND dozent_bio.meta_key = '_dozent_profile_bio'
			LEFT JOIN {$wpdb->usermeta} dozent_photo ON ID = dozent_photo.user_id AND dozent_photo.meta_key = '_dozent_profile_photo'
			
			WHERE ID = {$user_id} " );

		return $user;
	}


Changelog

Changelog
Version Description
DozentLMS 1.0.0 Introduced.