From 09b51588236a7ab7e324fcc6a5850a0d2ab61d47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 28 Jun 2010 11:21:07 +0200 Subject: [PATCH] Fixes for ProfileValidate. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/validations.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/validations.inc.php b/include/validations.inc.php index 7724c3d..dcc4b63 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -529,7 +529,7 @@ abstract class ProfileValidate extends Validate $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()}>"); } @@ -622,7 +622,11 @@ abstract class ProfileValidate extends Validate 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; + } } // }}} -- 2.1.4