Преглед на файлове

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 години
родител
ревизия
24d9629099
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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);
 					$oContact->Set('org_id', $iOrgId);
 				}
 				}
+				if (MetaModel::IsValidAttCode('Person', 'phone'))
+				{
+					$oContact->Set('phone', '+00 000 000 000');
+				}
 				$oContact->Set('email', 'my.email@foo.org');
 				$oContact->Set('email', 'my.email@foo.org');
 				$iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */);
 				$iContactId = $oContact->DBInsertTrackedNoReload($oChange, true /* skip security */);
 			}
 			}