Patch to support a different data model where contacts are not part of an org

SVN:trunk[1006]
This commit is contained in:
Denis Flaven
2010-12-03 09:10:15 +00:00
parent d4eaf43257
commit 53d5867b93

View File

@@ -442,7 +442,11 @@ class UserRightsProfile extends UserRightsAddOnAPI
$oContact->Set('name', 'My last name');
$oContact->Set('first_name', 'My first name');
//$oContact->Set('status', 'available');
$oContact->Set('org_id', $iOrgId);
if (MetaModel::IsValidAttCode('Person', 'org_id'))
{
// Protect for a different data model where contacts are not part of an org
$oContact->Set('org_id', $iOrgId);
}
$oContact->Set('email', 'my.email@foo.org');
//$oContact->Set('phone', '');
//$oContact->Set('location_id', $iLocationId);