Skip to content

Commit 4719803

Browse files
committed
suggestions from PR#2292
1 parent b1deee2 commit 4719803

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/WeBWorK/Authen.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,17 @@ sub verify {
152152
debug('BEGIN VERIFY');
153153

154154
return $self->call_next_authen_method if !$self->request_has_data_for_this_verification_module;
155-
my $authen_ref = ref($c->authen);
156-
if ($c->ce->{courseName} eq 'admin' && !(grep(/^$authen_ref$/, @{ $c->ce->{authen}{admin_module} }))) {
155+
my $authen_ref = ref($self);
156+
if ($c->ce->{courseName} eq $c->ce->{admin_course_id}
157+
&& !(grep {/^$authen_ref$/} @{ $c->ce->{authen}{admin_module} }))
158+
{
157159
$self->write_log_entry("Cannot authenticate into admin course using $authen_ref.");
158160
$c->stash(
159161
authen_error => $c->maketext(
160162
'There was an error during the login process. Please speak to your instructor or system administrator.'
161163
)
162164
);
163-
return ($self->call_next_authen_method());
165+
return $self->call_next_authen_method();
164166
}
165167

166168
$self->{was_verified} = $self->do_verify;

0 commit comments

Comments
 (0)