[Rt-commit] r7538 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 18 10:50:22 EDT 2007
Author: ruz
Date: Wed Apr 18 10:50:20 2007
New Revision: 7538
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/MailFrom.pm
Log:
r4971 at cubic-pc: cubic | 2007-04-18 02:30:48 +0400
* add debug into MailFrom
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/MailFrom.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/MailFrom.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Email/Auth/MailFrom.pm Wed Apr 18 10:50:20 2007
@@ -61,13 +61,17 @@
# We don't need to do any external lookups
my ( $Address, $Name ) = ParseSenderAddressFromHead( $args{'Message'}->head );
unless ( $Address ) {
+ $RT::Logger->error("Couldn't find sender's address");
return ( $args{'CurrentUser'}, -1 );
}
my $CurrentUser = new RT::CurrentUser;
$CurrentUser->LoadByEmail( $Address );
$CurrentUser->LoadByName( $Address ) unless $CurrentUser->Id;
- return ( $CurrentUser, 1 ) if $CurrentUser->Id;
+ if ( $CurrentUser->Id ) {
+ $RT::Logger->error("Mail from user #". $CurrentUser->Id ." ($Address)" );
+ return ( $CurrentUser, 1 );
+ }
# If the user can't be loaded, we may need to create one. Figure out the acl situation.
my $unpriv = RT::Group->new( $RT::SystemUser );
@@ -84,6 +88,8 @@
return ( $args{'CurrentUser'}, -1 );
}
+ $RT::Logger->debug("Going to create user with address '$Address'" );
+
# but before we do that, we need to make sure that the created user would have the right
# to do what we're doing.
if ( $args{'Ticket'} && $args{'Ticket'}->Id ) {
@@ -140,6 +146,7 @@
}
else {
+ $RT::Logger->warning("Action '". ($args{'Action'}||'') ."' is unknown");
return ( $args{'CurrentUser'}, 0 );
}
}
More information about the Rt-commit
mailing list