public function ChangeColor() { $userId = $this->page->GetUserId(); Log::Debug('Changing reservation color for userId: %s', $userId); $color = $this->page->GetReservationColor(); $user = $this->userRepository->LoadById($userId); $user->ChangePreference(UserPreferences::RESERVATION_COLOR, $color); $this->userRepository->Update($user); }