public function AddUser() { $userId = $this->manageUsersService->AddUser($this->page->GetUserName(), $this->page->GetEmail(), $this->page->GetFirstName(), $this->page->GetLastName(), $this->page->GetPassword(), $this->page->GetTimezone(), Configuration::Instance()->GetKey(ConfigKeys::LANGUAGE), Pages::DEFAULT_HOMEPAGE_ID, array(), $this->GetAttributeValues()); $groupId = $this->page->GetUserGroup(); if (!empty($groupId)) { $group = $this->groupRepository->LoadById($groupId); $group->AddUser($userId); $this->groupRepository->Update($group); } }