From d252d767b6d556a2347a28720c4e7d0909005f8b Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Fri, 30 Sep 2011 08:01:17 +0000 Subject: [PATCH] Initializes the admin contact's phone number, in case it is a mandatory field in the data model... SVN:trunk[1622] --- addons/userrights/userrightsprofile.class.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/userrights/userrightsprofile.class.inc.php b/addons/userrights/userrightsprofile.class.inc.php index bdb66fc1f..39987001f 100644 --- a/addons/userrights/userrightsprofile.class.inc.php +++ b/addons/userrights/userrightsprofile.class.inc.php @@ -557,6 +557,10 @@ class UserRightsProfile extends UserRightsAddOnAPI { $oContact->Set('org_id', $iOrgId); } + if (MetaModel::IsValidAttCode('Person', 'phone')) + { + $oContact->Set('phone', '+00 000 000 000'); + } $oContact->Set('email', 'my.email@foo.org'); $iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */); }