only try to log activity when there's an authenticated user, #36856
authorMark Wells <mark@freeside.biz>
Fri, 26 Jun 2015 22:55:56 +0000 (15:55 -0700)
committerMark Wells <mark@freeside.biz>
Fri, 26 Jun 2015 22:55:56 +0000 (15:55 -0700)
FS/FS/access_user_log.pm

index 884d250..9e7f7a0 100644 (file)
@@ -75,6 +75,8 @@ Adds a log entry for PATH for the current user and timestamp.
 sub insert_new_path {
   my( $class, $path ) = @_;
 
+  return '' unless defined $FS::CurrentUser::CurrentUser;
+
   my $self = $class->new( {
     'usernum' => $FS::CurrentUser::CurrentUser->usernum,
     'path'    => $path,