Esempio n. 1
0
 /**
  * On admin create, after save data.
  *
  * @param Event $event
  */
 public function onAdminAddAfterSave(Event $event)
 {
     $controller = $event->subject();
     $userMailer = new UserMail($event->data['user']);
     //  Send message in do not set user password.
     if ($controller->request->data('notification')) {
         $userMailer->sendActivateMessage();
     }
     //  Send message if set user status and password
     if ($controller->request->data('status')) {
         $userMailer->sendInfoMessage();
     }
     $userMailer->sendAdminMessageNewReg();
 }
Esempio n. 2
0
 /**
  * On success activate profile.
  *
  * @param Event $event
  * @return void
  */
 public function onSuccessActivate(Event $event)
 {
     $userMailer = new UserMail($event->data['user']);
     $userMailer->sendInfoMessage();
 }