$mailer = new PlMailer();
$mailer->setSubject($this->_mail_subj());
$mailer->setFrom("validation+{$this->type}@{$globals->mail->domain}");
- $mailer->addTo("\"{$this->profile->fullName()}\" <{$this->profile->bestEmail()}>");
+ $mailer->addTo("\"{$this->profile->fullName()}\" <{$this->profileOwner->bestEmail()}>");
if (!$this->userIsProfileOwner) {
$mailer->addCc("\"{$this->user->fullName()}\" <{$this->user->bestEmail()}>");
}
public function id()
{
- return $this->profile->id() . '_' . $this->type . '_' . $this->stamp;
+ if (!is_null($this->profile)) {
+ return $this->profile->id() . '_' . $this->type . '_' . $this->stamp;
+ } else {
+ return $this->user->id() . '_' . $this->type . '_' . $this->stamp;
+ }
}
// }}}