Clear autocreated contacts on create/update contact

This commit is contained in:
RainLoop Team 2013-12-04 22:52:44 +04:00
parent 3a4867abea
commit 43f094220c
2 changed files with 44 additions and 0 deletions

View file

@ -82,4 +82,21 @@ class Contact
$this->DisplayInList = 0 < \strlen($sDisplayName) ? $sDisplayName : (!empty($sDisplayEmail) ? $sDisplayEmail : '');
}
/**
* @return array
*/
public function GetEmails()
{
$aResult = array();
foreach ($this->Properties as /* @var $oProperty \RainLoop\Providers\PersonalAddressBook\Classes\Property */ &$oProperty)
{
if ($oProperty && $oProperty->IsEmail())
{
$aResult[] = $oProperty->Value;
}
}
return \array_unique($aResult);
}
}