public static function getUrl($email)
{
$sources = json_decode($GLOBALS['prefs']->getValue('search_sources'));
if (empty($sources)) {
$sources = array();
}
try {
$result = $GLOBALS['registry']->call('contacts/getField', array($email, 'freebusyUrl', $sources, true, true));
} catch (Horde_Exception $e) {
return false;
}
if (is_array($result)) {
return array_shift($result);
}
return $result;
}