Index: privatemsg.api.php
===================================================================
RCS file: /cvs/drupal/contributions/modules/privatemsg/Attic/privatemsg.api.php,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 privatemsg.api.php
--- privatemsg.api.php	10 Oct 2009 08:04:48 -0000	1.1.2.7
+++ privatemsg.api.php	26 Oct 2009 15:20:05 -0000
@@ -427,6 +427,25 @@ function hook_privatemsg_thread_operatio
     ),
   );
 }
+
+/**
+ * Hook which allows to look up a user object.
+ *
+ * You can try to look up a user object based on the information passed to the
+ * hook. The first hook that successfully looks up a specific string wins.
+ *
+ * Therefore, it is important to only return something if you can actually look
+ * up the string.
+ */
+function hook_privatemsg_name_lookup($string) {
+  if ((int)$string > 0) {
+    // This is a possible uid, try to load a matching user.
+    if ($recipient = user_load(array('uid' => $string))) {
+      return $recipient;
+    }
+  }
+}
+
 /**
  * @}
  */
\ No newline at end of file
