_data['password'])) { unset($this->_data['password']); } else { $this->_data['salt'] = substr(md5(time()), 0, 8); $this->_data['password'] = $this->_encryptPass($this->_data['password'], $this->_data['salt']); } } public function getApplicationIds($reviewerId) { if (!$reviewerId) { return array(); } $select = $this->_db->select(); $select->from($this->_getPair($this->_tableAlias . '2User'), array('userId')); $select->where('`reviewerId` = ?', $reviewerId, Qs_Db::INT_TYPE); return $this->_db->fetchCol($select); } protected function _addDependenciesFromDb(&$data) { $data['applicationUser'] = $this->getApplicationIds($data['id']); return parent::_addDependenciesFromDb($data); } protected function _insertDependency() { parent::_insertDependency(); $this->_saveDependency(); } protected function _updateDependency() { parent::_updateDependency(); $this->_saveDependency(); } protected function _saveDependency() { $this->_updateIds( $this->_getTableName($this->_tableAlias . '2User'), 'reviewerId', 'userId', $this->_data['applicationUser'] ); } }