/** * _getId * * @param void * * @return int **/ protected function _getId() { $id = parent::_getId(); if ($id > 0) { return $id; } //when staff add a new member $req = $this->mRoot->mContext->mRequest; $uid = $req->getRequest('uid') ? $req->getRequest('uid') : Legacy_Utils::getUid(); if ($this->_getGroupId() && $uid > 0) { $cri = new CriteriaCompo(); $cri->add(new Criteria('group_id', $this->_getGroupId())); $cri->add(new Criteria('uid', $uid)); $objs = $this->_getHandler()->getObjects($cri); if (count($objs) > 0) { return array_shift($objs)->getShow('member_id'); } } }