From 54f3136cfa1230e9a80641c7477ed75c0910d48a Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 24 Nov 2010 01:31:18 +0000 Subject: [PATCH] don't attempt to use RT::CurrentUser before RT has been initialized. very weird. RT#10695 --- FS/FS/TicketSystem/RT_Internal.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FS/FS/TicketSystem/RT_Internal.pm b/FS/FS/TicketSystem/RT_Internal.pm index f47648e7f..4036d9005 100644 --- a/FS/FS/TicketSystem/RT_Internal.pm +++ b/FS/FS/TicketSystem/RT_Internal.pm @@ -7,7 +7,6 @@ use MIME::Entity; use FS::UID qw(dbh); use FS::CGI qw(popurl); use FS::TicketSystem::RT_Libs; -use RT::CurrentUser; @ISA = qw( FS::TicketSystem::RT_Libs ); @@ -223,6 +222,9 @@ sub _web_external_auth { my $user = $FS::CurrentUser::CurrentUser->username; + eval 'use RT::CurrentUser;'; + die $@ if $@; + $session ||= {}; $session->{'CurrentUser'} = RT::CurrentUser->new(); -- 2.11.0