diff options
author | Yaco <franco@reevo.org> | 2022-03-08 13:08:34 +0000 |
---|---|---|
committer | Yaco <franco@reevo.org> | 2022-03-08 13:08:34 +0000 |
commit | c985c40d3f3fc6a2be3be3186df3bf2f32189475 (patch) | |
tree | cee11f5e5a7e351ee0fec36d58d72cbee4f7e49b /platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php |
first commit after acervus codebase
Diffstat (limited to 'platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php')
-rw-r--r-- | platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php b/platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php new file mode 100644 index 0000000..bd48875 --- /dev/null +++ b/platform/www/inc/Subscriptions/RegistrationSubscriptionSender.php @@ -0,0 +1,40 @@ +<?php + +namespace dokuwiki\Subscriptions; + +class RegistrationSubscriptionSender extends SubscriptionSender +{ + + /** + * Send a notify mail on new registration + * + * @param string $login login name of the new user + * @param string $fullname full name of the new user + * @param string $email email address of the new user + * + * @return bool true if a mail was sent + * @author Andreas Gohr <andi@splitbrain.org> + * + */ + public function sendRegister($login, $fullname, $email) + { + global $conf; + if (empty($conf['registernotify'])) { + return false; + } + + $trep = [ + 'NEWUSER' => $login, + 'NEWNAME' => $fullname, + 'NEWEMAIL' => $email, + ]; + + return $this->send( + $conf['registernotify'], + 'new_user', + $login, + 'registermail', + $trep + ); + } +} |