diff --git a/lib/WeBWorK/Authen.pm b/lib/WeBWorK/Authen.pm index c5de75dd0e..f73cc16c91 100644 --- a/lib/WeBWorK/Authen.pm +++ b/lib/WeBWorK/Authen.pm @@ -154,17 +154,13 @@ sub verify { debug('BEGIN VERIFY'); - return $self->call_next_authen_method if !$self->request_has_data_for_this_verification_module; my $authen_ref = ref($self); - if ($c->ce->{courseName} eq $c->ce->{admin_course_id} - && !(grep {/^$authen_ref$/} @{ $c->ce->{authen}{admin_module} })) + if ( + !$self->request_has_data_for_this_verification_module + || ($c->ce->{courseName} eq $c->ce->{admin_course_id} + && !(grep {/^$authen_ref$/} @{ $c->ce->{authen}{admin_module} })) + ) { - $self->write_log_entry("Cannot authenticate into admin course using $authen_ref."); - $c->stash( - authen_error => $c->maketext( - 'There was an error during the login process. Please speak to your instructor or system administrator.' - ) - ); return $self->call_next_authen_method(); }