Browse Source

Patch for supporting a data model without any Person.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1019 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 năm trước cách đây
mục cha
commit
4c371e2ad4
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      addons/userrights/userrightsprofile.class.inc.php

+ 4 - 1
addons/userrights/userrightsprofile.class.inc.php

@@ -465,7 +465,10 @@ class UserRightsProfile extends UserRightsAddOnAPI
 		$oUser = new UserLocal();
 		$oUser->Set('login', $sAdminUser);
 		$oUser->Set('password', $sAdminPwd);
-		$oUser->Set('contactid', $iContactId);
+		if (MetaModel::IsValidAttCode('UserLocal', 'contactid'))
+		{
+			$oUser->Set('contactid', $iContactId);
+		}
 		$oUser->Set('language', $sLanguage); // Language was chosen during the installation
 
 		// Add this user to the very specific 'admin' profile