X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations.inc.php;h=dcc4b6375eb7a57b4422603fbd4e7ec0f63d0d4b;hb=28c20b86be8b40cecba0d83080879f81c49e07ad;hp=7724c3dd5f7065a8029949cbbb03eac4a81bb4e4;hpb=d84b97ba60b09497b0e1c8dd23d86c29cc528088;p=platal.git 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; + } } // }}}