private function cleanSettings(User $user)
    {
        foreach ($user->getNotificationSettings() as $userNotificationSetting) {
            $this->objectManager->remove($userNotificationSetting);
        }

        $user->getNotificationSettings()->clear();

        foreach ($user->getSettings() as $userSetting) {
            $this->objectManager->remove($userSetting);
        }

        $user->getSettings()->clear();
    }
private function cleanSettings(User $user)
    {
        foreach ($user->getNotificationSettings() as $userNotificationSetting) {
            $this->objectManager->remove($userNotificationSetting);
        }

        $user->getNotificationSettings()->clear();

        foreach ($user->getSettings() as $userSetting) {
            $this->objectManager->remove($userSetting);
        }

        $user->getSettings()->clear();
    }
private function cleanSettings ( User $ user ) { foreach ( $ user -> getNotificationSettings ( ) as $ userNotificationSetting ) { $ this -> objectManager -> remove ( $ userNotificationSetting ) ; } $ user -> getNotificationSettings ( ) -> clear ( ) ; foreach ( $ user -> getSettings ( ) as $ userSetting ) { $ this -> objectManager -> remove ( $ userSetting ) ; } $ user -> getSettings ( ) -> clear ( ) ; }
Removes user settings.

@param User $user
Removes user settings .