unless (@result) {
my $User = new RT::User($RT::SystemUser);
$User->Load($id);
- print "$id - ".$User->Name." - ";
- print $User->SetDisabled(1)."\n";
-
+ next if ($User->Name !~ /\@/);
+ my $delta = Delta_Format(DateCalc($User->Created,"2013-05-23 12:10"), 0, '%dh');
+ my $msg = "$id - ".$User->Name." - Delta: $delta ";
+ if ($delta <= 30) {$msg .= " - NOT DISABLE!!!\n"}
+ else {$msg .= $User->SetDisabled(1)."\n"};
+ $RT::Logger->info("$msg");
+ print $msg;
}
}
MIMEObj => $args{'Message'}
);
unless ( $id ) {
+ if ($msg =~ /No permission to create/) {
+ $msg.= "\n\nIf you feel that you should have permission to create ".
+ "this ticket contact us \@ rt-nonrt\@usit.uio.no";
+ };
$msg = "Couldn't create ticket from message with commands, ".
"fallback to standard mailgate.\n\nError: $msg";
$RT::Logger->error( $msg );