mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix no admin mail if author is anonymous
https://xetown.com/questions/1858634
This commit is contained in:
parent
bcc11f253a
commit
939c5d8160
2 changed files with 4 additions and 9 deletions
|
|
@ -145,7 +145,6 @@ class BoardController extends Board
|
|||
$manual = true;
|
||||
$anonymous_name = $this->module_info->anonymous_name ?: 'anonymous';
|
||||
$anonymous_name = $this->createAnonymousName($anonymous_name, $logged_info->member_srl, $obj->document_srl);
|
||||
$this->module_info->admin_mail = '';
|
||||
|
||||
$obj->notify_message = 'N';
|
||||
$obj->email_address = $obj->homepage = $obj->user_id = '';
|
||||
|
|
@ -506,7 +505,6 @@ class BoardController extends Board
|
|||
// For anonymous use, remove writer's information and notifying information
|
||||
if($this->module_info->use_anonymous == 'Y' && (!$this->grant->manager || ($this->module_info->anonymous_except_admin ?? 'N') !== 'Y'))
|
||||
{
|
||||
$this->module_info->admin_mail = '';
|
||||
$obj->notify_message = 'N';
|
||||
$obj->member_srl = -1*$logged_info->member_srl;
|
||||
$obj->email_address = $obj->homepage = $obj->user_id = '';
|
||||
|
|
|
|||
|
|
@ -839,7 +839,10 @@ class CommentController extends Comment
|
|||
}
|
||||
}
|
||||
|
||||
$this->sendEmailToAdminAfterInsertComment($obj);
|
||||
if (config('mail.default_from'))
|
||||
{
|
||||
$this->sendEmailToAdminAfterInsertComment($obj);
|
||||
}
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
|
||||
|
|
@ -925,17 +928,11 @@ class CommentController extends Comment
|
|||
$oMail = new \Rhymix\Framework\Mail();
|
||||
$oMail->setSubject($mail_title);
|
||||
$oMail->setBody($mail_content);
|
||||
$oMail->setFrom(config('mail.default_from') ?: $member_info->email_address, $member_info->nick_name);
|
||||
if($member_info->email_address)
|
||||
{
|
||||
$oMail->setReplyTo($member_info->email_address);
|
||||
}
|
||||
foreach (array_map('trim', explode(',', $module_info->admin_mail)) as $email_address)
|
||||
{
|
||||
$oMail->addTo($email_address);
|
||||
}
|
||||
$oMail->send();
|
||||
// send email to all admins - STOP
|
||||
}
|
||||
|
||||
$comment_srl_list = array(0 => $obj->comment_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue