vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Query to update passwords for inactive users (https://vborg.vbsupport.ru/showthread.php?t=327768)

Piloux 01-16-2020 10:37 AM

Query to update passwords for inactive users
 
Hi,

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) 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 :

Code:

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

Dave 01-16-2020 10:40 AM

When you say date of last activity, you mean the last time they logged in or the last time they made a post/thread?

Piloux 01-16-2020 10:58 AM

Last time they made a post/thread yes.

--------------- Added [DATE]1579184184[/DATE] at [TIME]1579184184[/TIME] ---------------

Quote:

Originally Posted by Dave (Post 2601755)
When you say date of last activity, you mean the last time they logged in or the last time they made a post/thread?


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).

--------------- Added [DATE]1579187292[/DATE] at [TIME]1579187292[/TIME] ---------------

Edit problem solved thanks.


All times are GMT. The time now is 10:01 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01739 seconds
  • Memory Usage 1,713KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete