diff --git a/kronolith/lib/FreeBusy.php b/kronolith/lib/FreeBusy.php index 6be731e..0b35cc3 100644 --- a/kronolith/lib/FreeBusy.php +++ b/kronolith/lib/FreeBusy.php @@ -170,9 +170,17 @@ class Kronolith_FreeBusy $email = $tmp->bare_address; + /* Get the Identity for the current user */ + $identity = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Identity')->create(); + + /* check if owners free/busy URL should be returned (skip searching in address book) */ + if ( strcmp( $email, strval($identity->getDefaultFromAddress()) ) !== 0 ) + $url = Horde::url('fb.php', true, array('append_session' => -1))->add('u', $GLOBALS['registry']->getAuth()); + else + $url = self::getUrl($email); + /* Check if we can retrieve a VFB from the Free/Busy URL, if one is * set. */ - $url = self::getUrl($email); if ($url) { $url = trim($url); $http = $GLOBALS['injector']