* Code for task #41238.
This commit is contained in:
@@ -1261,13 +1261,20 @@ class projectModel extends model
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $account
|
||||
* @param string $removeExecution no|yes
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkMember($projectID, $account)
|
||||
public function unlinkMember($projectID, $account, $removeExecution = 'no')
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->eq((int)$projectID)->andWhere('type')->eq('project')->andWhere('account')->eq($account)->exec();
|
||||
|
||||
if($removeExecution == 'yes')
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getByProject($projectID, 'undone', 0, true);
|
||||
$this->dao->delete()->from(TABLE_TEAM)->where('root')->in(array_keys($executions))->andWhere('type')->eq('execution')->andWhere('account')->eq($account)->exec();
|
||||
}
|
||||
|
||||
$this->loadModel('user');
|
||||
$this->user->updateUserView($projectID, 'project', array($account));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user