- Create the admin account with the default language selected during the setup

SVN:trunk[566]
This commit is contained in:
Denis Flaven
2010-07-05 22:37:36 +00:00
parent 5bf0fa7f2a
commit f80cbcb93b
5 changed files with 10 additions and 9 deletions

View File

@@ -140,7 +140,7 @@ class UserRightsMatrix extends UserRightsAddOnAPI
);
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd)
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage)
{
// Maybe we should check that no other user with userid == 0 exists
$oUser = new UserRightsMatrixUsers();

View File

@@ -27,7 +27,7 @@
class UserRightsNull extends UserRightsAddOnAPI
{
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd)
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
return true;
}

View File

@@ -707,7 +707,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
);
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd)
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
// Create a change to record the history of the User object
$oChange = MetaModel::NewObject("CMDBChange");
@@ -748,7 +748,7 @@ class UserRightsProfile extends UserRightsAddOnAPI
$oUser->Set('login', $sAdminUser);
$oUser->Set('password', $sAdminPwd);
$oUser->Set('userid', $iContactId);
$oUser->Set('language', utils::GetConfig()->GetDefaultLanguage()); // Default language was chosen during the installation
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
$iUserId = $oUser->DBInsertTrackedNoReload($oChange);
// Add this user to the very specific 'admin' profile