From: Stéphane Jacob Date: Mon, 28 Jun 2010 09:21:07 +0000 (+0200) Subject: Fixes for ProfileValidate. X-Git-Tag: xorg/1.0.0~9 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=09b51588236a7ab7e324fcc6a5850a0d2ab61d47;p=platal.git Fixes for ProfileValidate. Signed-off-by: Stéphane Jacob --- 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; + } } // }}}