Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/kernel/utility/email.php
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Line(s) | |||||
WHERE Username = ' . $this->Conn->qstr($address); | WHERE Username = ' . $this->Conn->qstr($address); | ||||
$user_info = $this->Conn->GetRow($sql); | $user_info = $this->Conn->GetRow($sql); | ||||
if ( $user_info ) { | if ( $user_info ) { | ||||
// user still exists | // user still exists | ||||
$this->fromEmail = $user_info['Email']; | $this->fromEmail = $user_info['Email']; | ||||
$this->fromName = trim($user_info['FirstName'] . ' ' . $user_info['LastName']); | $this->fromName = trim($user_info['FirstName'] . ' ' . $user_info['LastName']); | ||||
$user = $this->Application->recallObject('u.email-from', null, Array ('skip_autoload' => true)); | $user = $this->Application->recallObject( | ||||
'u.email-from', | |||||
null, | |||||
array('live_table' => true, 'skip_autoload' => true) | |||||
); | |||||
/* @var $user UsersItem */ | /* @var $user UsersItem */ | ||||
$user->Load($user_info['PortalUserId']); | $user->Load($user_info['PortalUserId']); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
if ( $this->emailTemplate->GetDBField('SenderName') ) { | if ( $this->emailTemplate->GetDBField('SenderName') ) { | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | |||||
); | ); | ||||
if ( $user_info['Language'] && !isset($this->params['language_id']) ) { | if ( $user_info['Language'] && !isset($this->params['language_id']) ) { | ||||
$this->params['language_id'] = $user_info['Language']; | $this->params['language_id'] = $user_info['Language']; | ||||
} | } | ||||
array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $add_recipient); | array_unshift($this->recipients[EmailTemplate::RECIPIENT_TYPE_TO], $add_recipient); | ||||
$user = $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true)); | $user = $this->Application->recallObject( | ||||
'u.email-to', | |||||
null, | |||||
array('live_table' => true, 'skip_autoload' => true) | |||||
); | |||||
/* @var $user UsersItem */ | /* @var $user UsersItem */ | ||||
$user->Load($this->recipientUserId); | $user->Load($this->recipientUserId); | ||||
} | } | ||||
/** | /** | ||||
* Update with custom data given during event execution (email + name) | * Update with custom data given during event execution (email + name) | ||||
* | * | ||||
▲ Show 20 Lines • Show All 350 Lines • Show Last 20 Lines |