Load entities referenced by the user I am using Entity reference module. 

In one of my content types I have added Entity references as Users of the website.  So is there any way or API function to load the entities with logged in user is associated.  

For Ex: When User1 is creating an article node and will add other users such as user2 etc in one of my entity reference field. Now when user2 is logged in i would like to inform him that he was referenced by user1. Is there any API function to achieve it ?
I have created a view which will display all the entities in which current logged in user is referenced. Just Import this view and change it as per the content type you want.

Enjoy!!!!

$view = new view();
$view-&gt;name = 'users_referenced_entity';
$view-&gt;description = '';
$view-&gt;tag = 'default';
$view-&gt;base_table = 'node';
$view-&gt;human_name = 'Users Referenced Entity';
$view-&gt;core = 7;
$view-&gt;api_version = '3.0';
$view-&gt;disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view-&gt;new_display('default', 'Master', 'default');
$handler-&gt;display-&gt;display_options['title'] = 'Entities in Which Logged in User is Referenced';
$handler-&gt;display-&gt;display_options['use_more_always'] = FALSE;
$handler-&gt;display-&gt;display_options['access']['type'] = 'perm';
$handler-&gt;display-&gt;display_options['cache']['type'] = 'none';
$handler-&gt;display-&gt;display_options['query']['type'] = 'views_query';
$handler-&gt;display-&gt;display_options['exposed_form']['type'] = 'basic';
$handler-&gt;display-&gt;display_options['pager']['type'] = 'full';
$handler-&gt;display-&gt;display_options['pager']['options']['items_per_page'] = '10';
$handler-&gt;display-&gt;display_options['style_plugin'] = 'default';
$handler-&gt;display-&gt;display_options['row_plugin'] = 'node';
/* Sort criterion: Content: Post date */
$handler-&gt;display-&gt;display_options['sorts']['created']['id'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['table'] = 'node';
$handler-&gt;display-&gt;display_options['sorts']['created']['field'] = 'created';
$handler-&gt;display-&gt;display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Content: Referenced users (field_referenced_users) */
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['id'] = 'field_referenced_users_target_id';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['table'] = 'field_data_field_referenced_users';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['field'] = 'field_referenced_users_target_id';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['default_action'] = 'default';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['default_argument_type'] = 'current_user';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['summary']['number_of_records'] = '0';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['summary']['format'] = 'default_summary';
$handler-&gt;display-&gt;display_options['arguments']['field_referenced_users_target_id']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Content: Type */
$handler-&gt;display-&gt;display_options['filters']['type']['id'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['table'] = 'node';
$handler-&gt;display-&gt;display_options['filters']['type']['field'] = 'type';
$handler-&gt;display-&gt;display_options['filters']['type']['value'] = array(
  'article' =&gt; 'article',
  'page' =&gt; 'page',
);
$handler-&gt;display-&gt;display_options['filters']['type']['group'] = 1;

/* Display: Page */
$handler = $view-&gt;new_display('page', 'Page', 'page');
$handler-&gt;display-&gt;display_options['defaults']['hide_admin_links'] = FALSE;
$handler-&gt;display-&gt;display_options['path'] = 'users-referenced-entity';