diff --git a/plugin/whispeakauth/authentify.php b/plugin/whispeakauth/authentify.php
index 606161ab6e..ec0da940d5 100644
--- a/plugin/whispeakauth/authentify.php
+++ b/plugin/whispeakauth/authentify.php
@@ -29,9 +29,7 @@ if (ChamiloSession::read(WhispeakAuthPlugin::SESSION_AUTH_PASSWORD, false)) {
'warning'
);
- if (!empty($lpQuestionInfo)) {
- echo $message;
- } else {
+ if (empty($lpQuestionInfo)) {
Display::addFlash($message);
}
diff --git a/plugin/whispeakauth/authentify_password.php b/plugin/whispeakauth/authentify_password.php
index d38a6022fe..21c97b1859 100644
--- a/plugin/whispeakauth/authentify_password.php
+++ b/plugin/whispeakauth/authentify_password.php
@@ -24,14 +24,13 @@ if (empty($userId)) {
api_not_allowed($showHeader);
}
-if (empty($wsid)) {
- $message = Display::return_message($plugin->get_lang('SpeechAuthNotEnrolled'), 'warning');
-
- if (!empty($lpQuestionInfo)) {
- echo $message;
- } else {
- Display::addFlash($message);
- }
+if (!empty($lpQuestionInfo)) {
+ echo Display::return_message(
+ $plugin->get_lang('MaxAttemptsReached').'
'
+ .''.$plugin->get_lang('LoginWithUsernameAndPassword').'',
+ 'warning',
+ false
+ );
}
$form = new FormValidator(