Changed scope of methodimp so it is visible outside initial user check.

This commit is contained in:
Chris 2012-03-16 14:40:25 +00:00
parent 9a762ea119
commit fb36598ab6

View File

@ -168,6 +168,7 @@ sub valid_user {
my $username = shift;
my $password = shift;
my $valid = 0;
my $methodimpl;
$self -> {"lasterr"} = "";
@ -182,7 +183,7 @@ sub valid_user {
# Try the user's set authmethod if possible
if($authmethod) {
my $methodimpl = $self -> {"methods"} -> load_method($authmethod);
$methodimpl = $self -> {"methods"} -> load_method($authmethod);
# Check whether the user can authenticate if the implementation was found
$valid = $methodimpl -> authenticate($username, $password, $self)