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)$/;
$CurrentUser = qsearchs('access_user', {
'username' => $user,
#'_password' =>
+ 'disabled' => '',
} );
die "unknown user: $user" unless $CurrentUser; # or bad password
=cut
+package FS::CurrentUser::BootstrapUser;
+
+sub new {
+ my $proto = shift;
+ my $class = ref($proto) || $proto;
+ my $self = {};
+ bless ($self, $class);
+}
+
+sub AUTOLOAD { 1 };
+
1;