From d582440d5b1071241470ee252ec2edd1a7b16daf Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 31 Jul 2019 15:52:08 -0500 Subject: [PATCH] Minor - Whispeak fix message - refs BT#15941 --- plugin/whispeakauth/authentify.php | 4 +--- plugin/whispeakauth/authentify_password.php | 15 +++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) 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(