Using Static Variables in a Custom Module
drupal_static() stores variables based on the name of the function they're related to (hence the use of __FUNCTION__ when you initialise it in the relevant function).

You can pick it up again in any other function by querying drupal_static() again, with the name of the originating function. So in your case:

function viewusercontact_foo() {
  $static_var = drupal_static('viewusercontact_locateuser');
  ...
}