my $password = $userinfo->{password};
my $role = $userinfo->{role} || 'user';
+ if ($userinfo->{sub}) {
+ $username = $userinfo->{sub};
+ }
+
throw( "No username given" ) unless $username;
throw( "Invalid password - must be at least " . $self->MIN_PASS_LEN
. " characters long" )
});
if (!$user) {
- throw ("Could not find a user with that openid or sub!");
+ return undef;
}
my $new_user = $self->add_user({