guarantee that authMethod always returns something valid, even for users not created correctly

This commit is contained in:
Colin Kuskie 2008-11-24 03:05:34 +00:00
parent ad022c6699
commit 0569a37f89
2 changed files with 6 additions and 2 deletions

View file

@ -151,7 +151,8 @@ sub authenticate {
=head2 authMethod ( [authMethod] )
Gets or sets the authMethod in the Auth Object
Gets or sets the authMethod in the Auth Object. Returns 'WebGUI' as the
default method if a user has been created without an authMethod.
=head3 authMethod
@ -161,7 +162,9 @@ Gets or sets the authMethod in the Auth Object
sub authMethod {
my $self = shift;
return $self->{authMethod} if(!$_[0]);
if (!$_[0]) {
return $self->{authMethod} || 'WebGUI';
}
$self->{authMethod} = $_[0];
}