- Posts: 185
- Thank you received: 11
Ask the community, share ideas, and connect with other LimeSurvey users!
Add this (not tested) in the function
\Yii::log("Bad token entered", error, 'plugin.logToken.Error');
Use Yii to log it where you want exactly : www.limesurvey.org/manual/Optional_settings#Logging_settings
Not sure if it is still implemented in 3.x, but before if you had a couple of failed attempts you were blocked for a while from trying again. Was quite annoying because sometimes it wouldn't let you try again after the time (e.g. 10min). Haven't run into this problem for a while, so either I don't get my passwords wrong anymore or the feature has been taken out.For many a useful tool would be tool deny access to the survey by IP address when X number of failed tokens have been entered. So far, Limesurvey can't do this or at least in any way that I'm aware of.
I mean :bulgin wrote: Thank you @DenisChenu I've installed the ShowResponse and see it listed in the plugins page, but I'm lost on how to use your code to now make it log somewhere.
Add this (not tested) in the function
\Yii::log("Bad token entered", error, 'plugin.logToken.Error');
Use Yii to log it where you want exactly : www.limesurvey.org/manual/Optional_settings#Logging_settings
I wanted to add a note to mantis report (bugs.limesurvey.org/view.php?id=14710) but it is impossible to tell from the login screen there if I am logged in as a guest or my username. I can't find a link on mantis to add a note.
'log' => array( 'routes' => array( 'fileError' => array( 'class' => 'CFileLogRoute', 'logFile' => 'tokenaccess.log', 'levels' => 'warning, error', 'categories' => 'plugin.logToken.Error', ), ), ),