Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/upgrade.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/upgrade.pm	(revision 2219)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/upgrade.pm	(revision 2220)
@@ -1184,7 +1184,13 @@
             ],
         },
+        {
+            ver => 30,
+            recompute => 1,
+        },
     );
 
     my $dbi = $self->{_db};
+
+    my $NeedRecompute = 0;
 
     foreach my $maj (@updates) {
@@ -1193,5 +1199,5 @@
         }
         $self->log(LA_NOTICE, 'Switching to schema revision: ' . $maj->{ver} . "\n");
-        foreach my $sql (@{ $maj->{sql} }) {
+        foreach my $sql (@{ $maj->{sql} || []}) {
             {
                 my $sqlv = $sql;
@@ -1203,4 +1209,8 @@
                 return;
             };
+
+        }
+        if ($maj->{recompute}) {
+            $NeedRecompute = 1;
         }
 
@@ -1212,4 +1222,8 @@
             $maj->{ver}, 'schema_version'
         );
+    }
+
+    if ( $NeedRecompute ) {
+        $self->set_global_value('NeedRecomputeObject', 'Yes');
     }
 
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm	(revision 2219)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/SyncManager.pm	(revision 2220)
@@ -38,5 +38,5 @@
     };
 
-    foreach my $section (qw(basessynchro refreshexpired updatedyndata)) {
+    foreach my $section (qw(update basessynchro refreshexpired updatedyndata)) {
         if ( !grep {
             lc($ini->val($_, 'type', '')) eq $section
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Update.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Update.pm	(revision 2220)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Update.pm	(revision 2220)
@@ -0,0 +1,77 @@
+package LATMOS::Accounts::Task::Update;
+
+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
+
+This module update in the background objects that need some value to be recompute
+
+=cut
+
+
+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) = @_;
+
+    if ($self->{_base}->get_global_value('NeedRecomputeObject')) {
+        $self->{_base}->log(LA_INFO, "NeedRecomputeObject detected, recomputing objects");
+    } else {
+        return 1;
+    }
+
+    foreach my $otype (qw(user)) {
+        foreach my $name ($self->{_base}->listRealObjects($otype)) {
+            my $object = $self->{_base}->get_object($otype, $name);
+            $object->PostSetAttribute();
+            $self->{_base}->commit;
+        }
+    }
+
+    $self->{_base}->del_global_value('NeedRecomputeObject');
+    $self->{_base}->commit;
+
+    1;
+}
+
+1;
+
+__END__
+
+=head1 SEE ALSO
+
+L<LATMOS::Accounts>, L<LATMOS::Accounts::Task>
+
+=head1 AUTHOR
+
+Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt>
+
+=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
+
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Updatedyndata.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Updatedyndata.pm	(revision 2219)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Task/Updatedyndata.pm	(revision 2220)
@@ -26,5 +26,5 @@
 =cut
 
-# Every 10 minutes
+# Every 5 minutes
 sub runDelay { 5 * 60 }
 
