Class UserAutomaticDeactivationJob

java.lang.Object
io.meeds.portal.identity.job.UserAutomaticDeactivationJob

@Configuration @EnableScheduling public class UserAutomaticDeactivationJob extends Object
Scheduled job responsible for automatically deactivating inactive users.

This job periodically scans enabled user accounts and automatically disables those that have not logged into the platform for a configurable number of days.

The inactivity threshold is configurable using the property social.user.inactive.period.days (default value: 180 days).

For a user re-enabled by an administrator, inactivity is counted from the reactivation when it is more recent than the last login: the user stays enabled until the inactivity threshold has passed since the reactivation.

The job execution schedule is configurable using the cron expression social.UserAutomaticDeactivationJob.expression. By default, the job is executed once per day.

Users deactivated by this job are flagged as automatically deactivated in order to distinguish them from users manually disabled by administrators.

  • Constructor Details

    • UserAutomaticDeactivationJob

      public UserAutomaticDeactivationJob()
  • Method Details

    • deactivateUsersInactive

      @Scheduled(cron="${social.UserAutomaticDeactivationJob.expression:0 15 23 ? * *}", scheduler="clusterScheduler") public void deactivateUsersInactive()