1479c05b1SMichael Große<?php 2479c05b1SMichael Große 3479c05b1SMichael Großenamespace dokuwiki\Subscriptions; 4479c05b1SMichael Große 5479c05b1SMichael Großeclass RegistrationSubscriptionSender extends SubscriptionSender 6479c05b1SMichael Große{ 7479c05b1SMichael Große 8479c05b1SMichael Große /** 9479c05b1SMichael Große * Send a notify mail on new registration 10479c05b1SMichael Große * 11479c05b1SMichael Große * @param string $login login name of the new user 12479c05b1SMichael Große * @param string $fullname full name of the new user 13479c05b1SMichael Große * @param string $email email address of the new user 14*9c22b77cSMichael Große * 15479c05b1SMichael Große * @return bool true if a mail was sent 16*9c22b77cSMichael Große * @author Andreas Gohr <andi@splitbrain.org> 17*9c22b77cSMichael Große * 18479c05b1SMichael Große */ 19*9c22b77cSMichael Große public function sendRegister($login, $fullname, $email) 20*9c22b77cSMichael Große { 21479c05b1SMichael Große global $conf; 22*9c22b77cSMichael Große if (empty($conf['registernotify'])) { 23*9c22b77cSMichael Große return false; 24*9c22b77cSMichael Große } 25479c05b1SMichael Große 26*9c22b77cSMichael Große $trep = [ 27479c05b1SMichael Große 'NEWUSER' => $login, 28479c05b1SMichael Große 'NEWNAME' => $fullname, 29479c05b1SMichael Große 'NEWEMAIL' => $email, 30*9c22b77cSMichael Große ]; 31479c05b1SMichael Große 32479c05b1SMichael Große return $this->send( 33479c05b1SMichael Große $conf['registernotify'], 34479c05b1SMichael Große 'new_user', 35479c05b1SMichael Große $login, 36479c05b1SMichael Große 'registermail', 37479c05b1SMichael Große $trep 38479c05b1SMichael Große ); 39479c05b1SMichael Große } 40479c05b1SMichael Große} 41