Force password change after login

Discourse now supports the native ability to expire passwords.

To do so you will need to run:

user = User.find_by_username(username)
UserPasswordExpirer.expire_user_password(user)

This can be done either by Discourse staff for hosted customers or by entering your container, running a rails console and executing this on the particular users.

3 Likes