package LATMOS::Accounts::Task::Updatedyndata; use strict; use warnings; use base qw(LATMOS::Accounts::Task); use LATMOS::Accounts; use LATMOS::Accounts::Log; use LATMOS::Accounts::Utils; =head1 NAME LATMOS::Accounts::Task::Refreshexpired - Task to disable expired users =head1 DESCRIPTION Some base doesn't handle accounts expiration. One way to do it is to synchronize user with value denying login (wrong UNIX shell, password entry set to false, ...). For performance issue, objects are not written at each synchronisation, only when they changes. This module find expired user and refresh modification time to ensure propagation to other database. =cut # Every 5 minutes sub runDelay { 5 * 60 } sub init { my ($self) = @_; my $LA = LATMOS::Accounts->new($self->{config}); my $labase = $self->{base} ? $LA->base($self->{base}) : $LA->base; $labase && $labase->load or die "Cannot load base"; $self->{_la} = $LA; $self->{_base} = $labase; 1; } sub run { my ($self) = @_; $self->{_base}->PopulateDynData; 1; } 1; __END__ =head1 SEE ALSO L, L =head1 AUTHOR Olivier Thauvin, Eolivier.thauvin@latmos.ipsl.frE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012 CNRS SA/CETP/LATMOS This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available. =cut