Ignore:
Timestamp:
Sep 26, 2010, 9:59:08 PM (11 years ago)
Author:
teymour
Message:

Gestion de l'envoi de confirmation + qq correction de bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/lib/model/doctrine/Alerte.class.php

    r1438 r1441  
    1414{
    1515  public function getEmail() {
    16     if ($c = $this->Citoyen) {
    17       return $c->email;
     16    if ($this->citoyen_id) {
     17      return $this->getCitoyen()->email;
    1818    }
    1919    return $this->_get('email');
     
    3131  }
    3232
    33   public function save(Doctrine_Connection $c = null) {
     33   public function save(Doctrine_Connection $c = null) {
    3434    if (!$this->last_mail)
    3535      $this->last_mail = date('Y-m-d H:i:s');
    3636    if (!$this->verif)
    3737      $this->generateVerif();
     38    if ($this->citoyen_id)
     39      $this->confirmed = 1;
    3840    return parent::save($c);
    3941  }
Note: See TracChangeset for help on using the changeset viewer.