X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FCurrentUser.pm;h=bcd337d2c37d039a8250f18023c4c2d830c25e7a;hb=dafdfc24616b04a5ff594da31e2cdd03f58634b6;hp=37ed3592a412e29dac1e4b3f9cab4816869722de;hpb=1ed201c9f897f768e3ec8b9e7aee0fcb8b2bfed1;p=freeside.git diff --git a/FS/FS/CurrentUser.pm b/FS/FS/CurrentUser.pm index 37ed3592a..bcd337d2c 100644 --- a/FS/FS/CurrentUser.pm +++ b/FS/FS/CurrentUser.pm @@ -21,7 +21,9 @@ FS::CurrentUser - Package representing the current user sub load_user { my( $class, $user ) = @_; #, $pass - return "" if $upgrade_hack; + if ( $upgrade_hack ) { + return $CurrentUser = new FS::CurrentUser::BootstrapUser; + } #return "" if $user =~ /^fs_(queue|selfservice)$/; @@ -34,6 +36,7 @@ sub load_user { $CurrentUser = qsearchs('access_user', { 'username' => $user, #'_password' => + 'disabled' => '', } ); die "unknown user: $user" unless $CurrentUser; # or bad password @@ -49,5 +52,16 @@ Creepy crawlies =cut +package FS::CurrentUser::BootstrapUser; + +sub new { + my $proto = shift; + my $class = ref($proto) || $proto; + my $self = {}; + bless ($self, $class); +} + +sub AUTOLOAD { 1 }; + 1;