Subject: | [patch] index.cgi shouldn't die() when there's no current name |
Kwiki-Edit-RequireUserName-0.2
Perl 5.8.6
FreeBSD-stable (as of May 11, 2005)
Rather than die()ing, just returning undef results in the code correctly telling you that you need to give a UserName. See the attached patch.
--- lib/Kwiki/Edit/RequireUserName.pm.orig Mon Jun 6 12:28:29 2005
+++ lib/Kwiki/Edit/RequireUserName.pm Mon Jun 6 12:34:42 2005
@@ -30,7 +30,7 @@
sub have_UserName {
my $current_name = $self->hub->users->current->name ||
- die "Can't determine current UserName";
+ return undef;
my $anonymous_name = $self->config->user_default_name ||
die "Can't determine local name of anonymous user"; # set in
# config/user.yaml