Browse Source

Initializes the admin contact's phone number, in case it is a mandatory field in the data model...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1622 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 13 years ago
parent
commit
24d9629099
1 changed files with 4 additions and 0 deletions
  1. 4 0
      addons/userrights/userrightsprofile.class.inc.php

+ 4 - 0
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 */);
 			}