From: <mic...@us...> - 2005-08-31 15:13:41
|
Update of /cvsroot/tikiwiki/tiki/lib/registration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10637/lib/registration Modified Files: registrationlib.php Log Message: $default_sender_email should not be exposed - use sender_email instead; only expose admin's email address if they have indicated on Admin->Features 'contact_us' settings that it is okay to do so. Index: registrationlib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/registration/registrationlib.php,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- registrationlib.php 30 Aug 2005 21:45:59 -0000 1.23 +++ registrationlib.php 31 Aug 2005 15:13:33 -0000 1.24 @@ -180,7 +180,7 @@ */ function validate_registration() { global $allowRegister, $_REQUEST, $_SESSION, $min_pass_length, $useRegisterPasscode, $validateUsers, $rnd_num_reg; - global $sender_email, $default_sender_email, $contact_user, $pass_chr_num, $validateRegistration, $email_valid; + global $sender_email, $contact_user, $pass_chr_num, $validateRegistration, $email_valid; global $userlib, $logslib, $smarty, $tikilib; global $Debug; @@ -345,12 +345,13 @@ */ function callback_tikiwiki_send_email($raisedBy, $data) { global $_REQUEST, $_SESSION, $_SERVER, $min_pass_length, $useRegisterPasscode, $validateUsers, $registrationlib_apass; - global $sender_email, $default_sender_email, $contact_user, $pass_chr_num, $validateRegistration, $email_valid; - global $smarty, $tikilib; + global $contact_user, $pass_chr_num, $validateRegistration, $email_valid; + global $smarty, $tikilib, $userlib; global $Debug; if ($Debug) print "::send_email"; + $sender_email = $userlib->get_admin_email(); $mail_user = $data['user']; $mail_site = $data['mail_site']; @@ -371,7 +372,7 @@ include_once("lib/notifications/notificationemaillib.php"); if (isset($validateRegistration) and $validateRegistration == 'y') { $smarty->assign('msg',$smarty->fetch('mail/user_validation_waiting_msg.tpl')); - if ($default_sender_email == NULL or !$default_sender_email) { + if ($sender_email == NULL or !$sender_email) { include_once('lib/messu/messulib.php'); $mail_data = $smarty->fetch('mail/moderate_validation_mail.tpl'); $mail_subject = $smarty->fetch('mail/moderate_validation_mail_subject.tpl'); @@ -382,7 +383,7 @@ $mail->setText($mail_data); $mail_data = $smarty->fetch('mail/moderate_validation_mail_subject.tpl'); $mail->setSubject($mail_data); - if (!$mail->send(array($default_sender_email))) + if (!$mail->send(array($sender_email))) $smarty->assign('msg', tra("The registration mail can't be sent. Contact the administrator")); } } else { |