Merge branch 'sprint/217_liumengyi_25079' into 'master'
* Fix bug #25079. See merge request easycorp/zentaopms!4619
This commit is contained in:
@@ -271,13 +271,14 @@ class mailModel extends model
|
||||
* @param array $ccList
|
||||
* @param bool $includeMe
|
||||
* @param array $emails
|
||||
* @param bool $forceSync
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function send($toList, $subject, $body = '', $ccList = '', $includeMe = false, $emails = array())
|
||||
public function send($toList, $subject, $body = '', $ccList = '', $includeMe = false, $emails = array(), $forceSync = false)
|
||||
{
|
||||
if(!$this->config->mail->turnon) return;
|
||||
if(!empty($this->config->mail->async)) return $this->addQueue($toList, $subject, $body, $ccList, $includeMe);
|
||||
if(!empty($this->config->mail->async) and !$forceSync) return $this->addQueue($toList, $subject, $body, $ccList, $includeMe);
|
||||
|
||||
ob_start();
|
||||
|
||||
|
||||
@@ -1119,7 +1119,7 @@ class user extends control
|
||||
$code = uniqid();
|
||||
$this->dao->update(TABLE_USER)->set('resetToken')->eq(json_encode(array('code' => $code, 'endTime' => strtotime("+{$this->config->user->resetPasswordTimeout} minutes"))))->where('account')->eq($account)->exec();
|
||||
|
||||
$result = $this->mail->send($account, $this->lang->user->resetPWD, sprintf($this->lang->mail->forgetPassword, commonModel::getSysURL() . inlink('resetPassword', 'code=' . $code)), true);
|
||||
$result = $this->mail->send($account, $this->lang->user->resetPWD, sprintf($this->lang->mail->forgetPassword, commonModel::getSysURL() . inlink('resetPassword', 'code=' . $code)), '', true, array(), true);
|
||||
if(strstr($result, 'ERROR')) return $this->send(array('result' => 'fail', 'message' => $this->lang->user->error->sendMailFail), true);
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->user->sendEmailSuccess));
|
||||
|
||||
Reference in New Issue
Block a user