No announcement yet.

Query to update passwords for inactive users

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] Query to update passwords for inactive users


    I would like to know if it's possible to execute a query directly on the database in order to update a usergroup's users passwords if their date of last activity (last time they made a post/thread) is before let's say 1st december of 2019. And yes please don't tell me to make password expiration like 7 days because if the accounts original passwords have been compromised, it means that the hacker could potentially change again the new password.

    I had already done that before with that kind of request :

    UPDATE users SET password = 'the-same-md5-password-for-every-update' WHERE usergroupid=3

    Since the salt is different for every member, that means they all should have a different password even by putting the same md5 pass.

    The thing is that I don't think using "<" in the query's condition would have an effect on the lastpost entry since it's not a single number (it's something like "1578136140" and I don't know how to interpret that).

    Thanks for your help
    Last edited by alano; Thu 16 Jan '20, 6:15am.

  • #2
    Edit : problem solved thanks.
    Last edited by alano; Thu 16 Jan '20, 10:04am.


    Related Topics