Exemplo n.º 1
0
 function setFromRoo($ar, $roo)
 {
     $this->setFrom($ar);
     if (!empty($ar['passwd1'])) {
         $this->setPassword($ar['passwd1']);
     }
     if ($this->id && $this->email == $roo->old->email && $this->company_id == $roo->old->company_id) {
         return true;
     }
     if (empty($this->email)) {
         return true;
     }
     $xx = DB_Dataobject::factory($this->tableName());
     $xx->setFrom(array('email' => $this->email));
     if ($xx->count()) {
         return "Duplicate Email found";
     }
     return true;
 }