- if (strpos($name, 'http://')) {
- // At first we have to ensure that the contact exists
- Contact::getIdForURL($name);
-
- // Now we should have something
- $contact = Contact::getDetailsByURL($name, $profile_uid);
- } elseif (strpos($name, '@')) {
- // This function automatically probes when no entry was found
- $contact = Contact::getDetailsByAddr($name, $profile_uid);
+ if (strpos($name, 'http://') || strpos($name, '@')) {
+ $contact = Contact::getByURLForUser($name, $profile_uid);