how can i add user avatar to admin menu What function do I need to use for adding the image in the admin menu?
Above menu is rendered from toolbar.tpl.php inside toolbar module.

All you need to is override above toolbar.tpl.php by copying it to your themes folder and modify code to add image.

&lt;?php

/**
 * @file
 * Default template for admin toolbar.
 *
 * Available variables:
 * - $classes: String of classes that can be used to style contextually through
 *   CSS. It can be manipulated through the variable $classes_array from
 *   preprocess functions. The default value has the following:
 *   - toolbar: The current template type, i.e., "theming hook".
 * - $toolbar['toolbar_user']: User account / logout links.
 * - $toolbar['toolbar_menu']: Top level management menu links.
 * - $toolbar['toolbar_drawer']: A place for extended toolbar content.
 *
 * Other variables:
 * - $classes_array: Array of html class attribute values. It is flattened
 *   into a string within the variable $classes.
 *
 * @see template_preprocess()
 * @see template_preprocess_toolbar()
 *
 * @ingroup themeable
 */
?&gt;
&lt;div id="toolbar" class="&lt;?php print $classes; ?&gt; clearfix"&gt;
  &lt;div class="toolbar-menu clearfix"&gt;
    &lt;?php print render($toolbar['toolbar_home']); ?&gt;
    &lt;?php print render($toolbar['toolbar_user']); ?&gt;
    &lt;?php print render($toolbar['toolbar_menu']); ?&gt;
    &lt;?php

    $variables = array(
      'path' =&gt; 'path/to/img.jpg',
      'alt' =&gt; 'Test alt',
      'title' =&gt; 'Test title',
      'width' =&gt; '5px',
      'height' =&gt; '5px',
      'attributes' =&gt; array('class' =&gt; 'some-img', 'id' =&gt; 'my-img'),
      );
      print theme_image($variables)?&gt;
    &lt;?php if ($toolbar['toolbar_drawer']):?&gt;
      &lt;?php print render($toolbar['toolbar_toggle']); ?&gt;
    &lt;?php endif; ?&gt;
  &lt;/div&gt;

  &lt;div class="&lt;?php echo $toolbar['toolbar_drawer_classes']; ?&gt;"&gt;
    &lt;?php print render($toolbar['toolbar_drawer']); ?&gt;
  &lt;/div&gt;
&lt;/div&gt;