[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Subscriptions/ -> RegistrationSubscriptionSender.php (source)

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