Back to vBulletin Tips & Tricks

Force Password Reset
by ozzy47 23 Oct 2013
Rating: (4 votes - 4.00 average)

As most vBulletin owners know, you can set a password expiry for your usergroups.

Sometimes after a hack, on your site, or you just feel the need to make all your members change their passwords, this can be a pain in the rear end.

Sure you can set the password expiry to 7 days, but then it will not ensure every user logs in, and changes it before that time, Any usey changing it right away would havr to change it once again in 7 mode days.

The solution!

Set your usergroups password expiry date to some time like 730.

Should you have alot of usergroups, and don't want to change them all individually, you can run this query in the ACP.
Code:
UPDATE `usergroup` SET `passwordexpires` = '730' WHERE `usergroup`.`usergroupid` !=6;
That will set every usergroups password expiry to 730 days except for usergroup 6. Should you want to add more usergroups use this query.
Code:
UPDATE `usergroup` SET `passwordexpires` = '731' WHERE `usergroup`.`usergroupid` !=6 AND `usergroup`.`usergroupid` !=5 AND `usergroup`.`usergroupid` !=7;
That will set every usergroups password expiry to 730 days except for usergroup 6, 5, 7.

Now to reset the users password date.

Run this query in the acp.
Code:
UPDATE `user` SET `passworddate` = '2011-10-20' WHERE `user`.`userid` !=1;
That will set everyone's date back to two days before the expiry date except the userid of 1

Should you want to exclude more users, run this query.
Code:
UPDATE `user` SET `passworddate` = '2012-10-22' WHERE `user`.`userid` !=1 AND `user`.`userid` !=2 AND `user`.`userid` !=3;
That will set everyone's date back to two days before the expiry date except the userid of 1, 2, 3

So now when any user logs into the forum, they will be forced to reset their passwords.

vblts.ru supports vBulletin®, 2022-2024