public function read($id) { parent::read($id); if (!$this->communicate_via) { $this->communicate_via = self::COMMUNICATE_VIA_EMAIL; } if (!$this->avatar_ref) { $default_avatar = "anonymoose.png"; $this->avatar_ref = $default_avatar; } }
/** * Reads the model from the mongo collection * Ensures that the required pick lists exist even if not present in the database * @param string $id * @see MapperModel::read() */ public function read($id) { parent::read($id); $this->userProperties->ensurePickListsExist(); }