1

I see this thread about automatically activating/verify user accounts. However, I have 2 group of users, 1 group is open public which would like to have automatically activating/verify. The 2nd group is private, need activate email and verify. Should I write a plugin or just modify UsersService.php to split 2 directions on saveUser?

Thanks, Angela

1 Answer 1

0

Should I write a plugin or just modify UsersService.php to split 2 directions on saveUser?

The first one. The second one has many drawbacks:

  1. Any changes you make in craft/app can (and probably will) get overwritten during an update.

  2. Which means you'll have to reapply them after updating.

  3. It's not supported.

Craft has a bunch of events that plugins can listen to and run logic when they fire without hacking core Craft files. In your case, it sounds like onBeforeSaveUser or onSaveUser might be what you need.

1
  • Thanks @ Jeremy-daalder @ Damon Sorry @Matt-stein, I didn't pay attention that is a new question. I will do it next time. Thanks for taking care of it. May 23, 2017 at 14:08

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.