RegistrationSubscriptionSender.php 940 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace dokuwiki\Subscriptions;
  3. class RegistrationSubscriptionSender extends SubscriptionSender
  4. {
  5. /**
  6. * Send a notify mail on new registration
  7. *
  8. * @param string $login login name of the new user
  9. * @param string $fullname full name of the new user
  10. * @param string $email email address of the new user
  11. *
  12. * @return bool true if a mail was sent
  13. * @author Andreas Gohr <andi@splitbrain.org>
  14. *
  15. */
  16. public function sendRegister($login, $fullname, $email)
  17. {
  18. global $conf;
  19. if (empty($conf['registernotify'])) {
  20. return false;
  21. }
  22. $trep = [
  23. 'NEWUSER' => $login,
  24. 'NEWNAME' => $fullname,
  25. 'NEWEMAIL' => $email,
  26. ];
  27. return $this->send(
  28. $conf['registernotify'],
  29. 'new_user',
  30. $login,
  31. 'registermail',
  32. $trep
  33. );
  34. }
  35. }