3

I am using Drupal 7. In the Privatemsg module my autocomplete shows myself and admin. How can I disable displaying the user who's logged in in the autocomplete and disable displaying admin?

1 Answer 1

1

Put this code in your template.php file

function yourtheme-name_query_privatemsg_autocomplete_alter($query) {
  global $user;
  $query-> condition('u.uid' , $user->uid, '<>');
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.