Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved How to obtain the date of the last login attempt?
#1
Not Solved
Hello

In the table mybb_users there is a field called "loginattempts" that stores the attempts where you tried to log in failed, but my question is in which field of which table is stored the date of the last failed attempt

Greetings and thanks in advance
Reply
#2
Not Solved
The time of the last failed login attempt is not stored in the database.
Reply
#3
Not Solved
(07-18-2018, 03:40 PM)linguist Wrote: The time of the last failed login attempt is not stored in the database.

Then where is stored the time of the last failed login attempt?
Reply
#4
Not Solved
(07-19-2018, 12:01 PM)Augustino7 Wrote:
(07-18-2018, 03:40 PM)linguist Wrote: The time of the last failed login attempt is not stored in the database.

Then where is stored the time of the last failed login attempt?

Hmm... linguist just answered that question already.

Repeating the same question is going get you the same answer.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply
#5
Not Solved
The only table field you might find useful is "loginlockoutexpiry", but that only tells you when someone's lockout will be over so you can calculate back (from the lockout time you configured) when their last "one too many" attempt was and they thriggered the lockout. Other than that, failed logins are not tracked by default and people who failed only once and then logged in successfully will have no record anywhere.

You might want to use this plugin: "Security Log" by Starpaul: https://community.mybb.com/mods.php?action=view&pid=740
Reply
#6
Not Solved
(07-19-2018, 12:01 PM)Augustino7 Wrote:
(07-18-2018, 03:40 PM)linguist Wrote: The time of the last failed login attempt is not stored in the database.

Then where is stored the time of the last failed login attempt?

Hmm... linguist just answered that question already.

Repeating the same question is going get you the same answer.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply
#7
Not Solved
(07-19-2018, 12:59 PM)linguist Wrote: The only table field you might find useful is "loginlockoutexpiry", but that only tells you when someone's lockout will be over so you can calculate back (from the lockout time you configured) when their last "one too many" attempt was and they thriggered the lockout. Other than that, failed logins are not tracked by default and people who failed only once and then logged in successfully will have no record anywhere.

You might want to use this plugin: "Security Log" by Starpaul: https://community.mybb.com/mods.php?action=view&pid=740

I would not like to use a plugin, I prefer to understand how it works

Intentionally block a test user and the loginlockoutexpiry field is 0, the time that was the last failed attempt will be saved in a cookie?
Reply
#8
Not Solved
The last login attempt is not stored, but you can calculate it using the loginlockoutexpiry field.

$loginlockoutexpiry - ($mybb->settings['failedlogintime'] * 60)

This would be the math. It assumes you are obtaining the loginlockoutexpiry field in an homonym variable.
[Image: fSGNVQj.png]
Reply
#9
Not Solved
(07-19-2018, 04:14 PM)Shade Wrote: The last login attempt is not stored, but you can calculate it using the loginlockoutexpiry field.

$loginlockoutexpiry - ($mybb->settings['failedlogintime'] * 60)

This would be the math. It assumes you are obtaining the loginlockoutexpiry field in an homonym variable.

Thank you very much, I will try, any doubt that I have, I will bother you again

Best Regards
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)