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