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 * Send a notify mail on new registration 9479c05b1SMichael Große * 10479c05b1SMichael Große * @param string $login login name of the new user 11479c05b1SMichael Große * @param string $fullname full name of the new user 12479c05b1SMichael Große * @param string $email email address of the new user 13*9c22b77cSMichael Große * 14479c05b1SMichael Große * @return bool true if a mail was sent 15*9c22b77cSMichael Große * @author Andreas Gohr <andi@splitbrain.org> 16*9c22b77cSMichael Große * 17479c05b1SMichael Große */ 18*9c22b77cSMichael Große public function sendRegister($login, $fullname, $email) 19*9c22b77cSMichael Große { 20479c05b1SMichael Große global $conf; 21*9c22b77cSMichael Große if (empty($conf['registernotify'])) { 22*9c22b77cSMichael Große return false; 23*9c22b77cSMichael Große } 24479c05b1SMichael Große 25*9c22b77cSMichael Große $trep = [ 26479c05b1SMichael Große 'NEWUSER' => $login, 27479c05b1SMichael Große 'NEWNAME' => $fullname, 28479c05b1SMichael Große 'NEWEMAIL' => $email, 29*9c22b77cSMichael Große ]; 30479c05b1SMichael Große 31479c05b1SMichael Große return $this->send( 32479c05b1SMichael Große $conf['registernotify'], 33479c05b1SMichael Große 'new_user', 34479c05b1SMichael Große $login, 35479c05b1SMichael Große 'registermail', 36479c05b1SMichael Große $trep 37479c05b1SMichael Große ); 38479c05b1SMichael Große } 39479c05b1SMichael Große} 40