From 230ee8b52757cbd3aa45c47f0633a64809e704b8 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 26 Jun 2015 15:55:56 -0700 Subject: [PATCH] only try to log activity when there's an authenticated user, #36856 --- FS/FS/access_user_log.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FS/FS/access_user_log.pm b/FS/FS/access_user_log.pm index 884d250d6..9e7f7a00e 100644 --- a/FS/FS/access_user_log.pm +++ b/FS/FS/access_user_log.pm @@ -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, -- 2.11.0