only try to log activity when there's an authenticated user, #36856
[freeside.git] / 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,