2

I have a bunch (about 3000) of imported users from a website, which is currently on a redesign. When the site is finished, I would like to send an email to all users, saying that the site is relaunched, has a new structure ect. and therefore they have to set a new password.

I found nothing in the Craft settings, as well in the forum.

Do I have to write a plugin? Or can I achieve this with the Sprout Email plugin? I saw, there is a event "When a user logs in".

This could also work for me: a users logs in and gets automatically to the a page to set a new password.

3

I'm not sure if the Sprout Email plugin can do anything to help you or not, but I can think of a few options that would involve simple, custom plugins.

Every user has a "Require a password reset on next login" that an administrator can set from the CP under their settings. You probably don't want to do that manually for 3,000 users, but a simple plugin (or a simple SQL query) could set the passwordResetRequired column in the craft_users table in the database to 1.

If you wanted to send an email and include a password reset link in that email ahead of time, a plugin would change that column to 1 for all users and follow similar logic in the UsersController for getting the password reset link and include that in the email body that you'd send to every user programatically.

2
  • the sql query route would probably be easiest if OP has access to the database administration – Keith M Aug 23 '17 at 4:11
  • did anyone write a plugin for this? I am in the same situation. Although I might just write them a manual on how to reset the password. But it's rather lame and customers tend to get confused very easily. Anyone? – outline4 Oct 22 '19 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.