summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/CurrentUser.pm15
-rw-r--r--FS/FS/UID.pm2
2 files changed, 15 insertions, 2 deletions
diff --git a/FS/FS/CurrentUser.pm b/FS/FS/CurrentUser.pm
index 37ed3592a..a2dfd714c 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 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;
diff --git a/FS/FS/UID.pm b/FS/FS/UID.pm
index 1f51ca69c..0d32002b2 100644
--- a/FS/FS/UID.pm
+++ b/FS/FS/UID.pm
@@ -74,7 +74,7 @@ sub forksuidsetup {
$user = shift;
if ( $FS::CurrentUser::upgrade_hack ) {
- $user = '';
+ $user = 'fs_bootstrap';
} else {
croak "fatal: adminsuidsetup called without arguements" unless $user;