Fix display of ~username path in response.

This commit is contained in:
Andrew McMillan 2010-03-27 17:01:12 +13:00
parent 3074d04916
commit 13fddbade8

View File

@ -180,7 +180,8 @@ class CalDAVPrincipal
$this->exists = true;
$this->InitialiseRecord($usr);
if ( is_array($parameters) && isset($parameters['path']) && preg_match('#^/principals/#', $parameters['path']) ) {
if ( is_array($parameters) && !isset($parameters['username']) && !isset($parameters['user_no'])
&& isset($parameters['path']) && preg_match('{^/(~|principals/)}', $parameters['path']) ) {
// Force it to match
$this->url = $parameters['path'];
$this->dav_name = $parameters['path'];