Пример #1
0
 /**
  * Send a confirmation e-mail to the user if the account is not active.
  */
 public function afterCreate()
 {
     if ($this->getStatus() === static::STATUS_ACTIVE) {
         return;
     }
     $emailConfirmation = new UserEmailConfirmations();
     $emailConfirmation->setUserId($this->id);
     if ($emailConfirmation->save()) {
         $this->getDI()->getFlashSession()->notice('A confirmation mail has been sent to ' . $this->email);
     }
 }
Пример #2
0
 /**
  * Send a confirmation e-mail to the user if the account is not active
  */
 public function afterCreate()
 {
     if (true === $this->isActive()) {
         return;
     }
     $emailConfirmation = new UserEmailConfirmations();
     $emailConfirmation->setUserId($this->id);
     if ($emailConfirmation->save()) {
         $this->getDI()->getFlashSession()->notice('A confirmation mail has been sent to ' . $this->email);
     }
 }