add the small FS::CurrentUser::BootstrapUser class for... surprise... bootstrapping
[freeside.git] / FS / FS / CurrentUser.pm
index 37ed359..a2dfd71 100644 (file)
@@ -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 new FS::CurrentUser::BootstrapUser;
+  }
 
   #return "" if $user =~ /^fs_(queue|selfservice)$/;
 
@@ -49,5 +51,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;