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

Angela Chan
  • 309
  • 1
  • 8

1 Answers1

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.

Brad Bell
  • 67,440
  • 6
  • 73
  • 143
  • 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. – Angela Chan May 23 '17 at 14:08