Feature: Synchronize hidden profiles 

Description 

The profile synchronization (profile update command, \FGTCLB\AcademicPersons\Service\ProfileUpdateCommandService) now also keeps hidden profiles and profiles of disabled frontend users up to date. Previously a frontend user that was disabled or whose profile was hidden was excluded from the synchronization completely, so the profile was never updated and no synchronization events were dispatched for it.

The \FGTCLB\AcademicPersons\Domain\Repository\ProfileRepository method findByFrontendUser() gained an optional argument to include hidden profiles:

  • findByFrontendUser(int $frontendUserUid, bool $showHidden = false): QueryResultInterface

The synchronization calls it with $showHidden = true, while the frontend display keeps the default ( $showHidden = false) and therefore continues to respect the visibility.

The visibility itself is never changed by the synchronization — that stays the responsibility of the \FGTCLB\AcademicPersons\Profile\ProfileFactoryInterface implementation — so a manually hidden profile stays hidden while its data is kept in sync.

The profile create command keeps skipping frontend users that already have a profile, including a hidden one, so no duplicate profiles are created for them. It now also creates a profile for a disabled frontend user that does not have one yet: \FGTCLB\AcademicPersons\Provider\FrontendUserProvider::getUsersWithoutProfileResult() returns disabled frontend users and \FGTCLB\AcademicPersons\Profile\AbstractProfileFactory::createProfileForUser() resolves the frontend user ignoring its visibility.

Impact 

Hidden profiles and profiles of disabled frontend users are no longer silently excluded from the synchronization. To exclude a profile from synchronization, use the dedicated skip_sync flag of the profile instead of hiding it or disabling the frontend user.

Affected Installations 

All installations using the profile synchronization (EXT:academic_persons create/update profile commands) starting with version 2.4.