diff --git a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts
index 03bf0ad..8e68c29 100644
--- a/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts
+++ b/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/expireaccounts
@@ -45,11 +45,11 @@
DESC_WARN_USERS
- In addition to notify an administrator, you can notify the user in question by email.
+ Should the user be warned when his account is about to expire
- LABEL_WARN_USERS
- Notify users
+ LABEL_WARN_USER
+ Notify user
LABEL_USER_ACCOUNT
diff --git a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts
index a6db803..5b832d6 100644
--- a/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts
+++ b/root/etc/e-smith/locale/fr/etc/e-smith/web/functions/expireaccounts
@@ -44,16 +44,16 @@
Destinataire des notifications
- DESC_WARN_USERS
- En plus de notifier un administrateur, vous pouvez notifier l'utilisateur concerné par email.
+ DESC_WARN_USER
+ L'utilisateur doit-il ĂȘtre avertie lorsque son compte est sur le point d'expirer ?
- LABEL_USER_ACCOUNT
- Compte utilisateur
+ LABEL_WARN_USER
+ Notifier l'utilisateur
- LABEL_WARN_USERS
- Notifier les utilisateurs
+ LABEL_USER_ACCOUNT
+ Compte utilisateur
DESC_LOCK_ON_DATE
diff --git a/root/etc/e-smith/web/functions/expireaccounts b/root/etc/e-smith/web/functions/expireaccounts
index 1e83d2b..68de411 100755
--- a/root/etc/e-smith/web/functions/expireaccounts
+++ b/root/etc/e-smith/web/functions/expireaccounts
@@ -57,10 +57,6 @@ __DATA__
DESC_WARNING_RECIPIENT
-
- DESC_WARN_USERS
-
-
@@ -84,6 +80,10 @@ __DATA__
DESC_LOCK_ON_DATE
+
+ DESC_WARN_USER
+
+
DESC_FORWARD_AFTER_LOCK
diff --git a/root/sbin/e-smith/expire-accounts b/root/sbin/e-smith/expire-accounts
index 3f7665b..52ceade 100644
--- a/root/sbin/e-smith/expire-accounts
+++ b/root/sbin/e-smith/expire-accounts
@@ -28,7 +28,6 @@ my $service = $c->get('ExpireAccounts') ||
);
my $warn_delay = $service->prop('WarningDelay') || '30';
-my $warn_users = $service->prop('WarnUsers') || 'no';
my $recipient = $service->prop('WarningRecipient') || 'root';
my $days_between_warn = $service->prop('DaysBetweenWarnings') || '5';
my $archive_compress = $service->prop('ArchiveCompression') || '/usr/bin/pbzip2';
@@ -148,6 +147,7 @@ my $send_warn_for = {};
foreach my $user (keys %$rem){
my $rec = $a->get($user) || next;
my $last_notif = $rec->prop('ExpireLastNotifiedOn') || 'never';
+ my $warn_user = $rec->prop('ExpireWarnUser') || 'disabled';
if ($last_notif =~ m/^(\d{4})\-(\d{1,2})\-(\d{1,2})/){
$last_notif = DateTime->new(
year => $1,
@@ -164,7 +164,7 @@ foreach my $user (keys %$rem){
# Use templates-custom version by preference if it exists
-f "${templates}-custom${source}" and $templates .= "-custom";
- if ($warn_users){
+ if ($warn_user =~ m/^enabled|yes|on|1$/){
my $t = new Text::Template(TYPE => 'FILE',
SOURCE => "${templates}${source}");
diff --git a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm
index 20f467f..bfdbe2c 100644
--- a/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm
+++ b/root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm
@@ -239,7 +239,7 @@ sub modify_config{
my ($self) = @_;
my $rec = $c->get('ExpireAccounts') || $c->new_record('ExpireAccounts', { type => 'service' });
my %new_props = ();
- foreach my $prop (qw(WarningDelay DaysBetweenWarnings WarningRecipient WarnUsers)){
+ foreach my $prop (qw(WarningDelay DaysBetweenWarnings WarningRecipient)){
if (!$self->{cgi}->param($prop) || $self->{cgi}->param($prop) eq ''){
$rec->delete_prop($prop);
}
@@ -271,7 +271,7 @@ sub modify_user {
);
}
my %new_props = ();
- foreach my $prop (qw(ExpireLockOn ExpireForwardAfterLock ExpireAutoReply ExpireDeleteAfterLock)){
+ foreach my $prop (qw(ExpireLockOn ExpireForwardAfterLock ExpireAutoReply ExpireDeleteAfterLock WarnUser)){
if (!$self->{cgi}->param($prop) || $self->{cgi}->param($prop) eq ''){
$acct->delete_prop($prop);
}