/** * Accept a specified task */ public function accept($id) { global $USER; $result = array(); if ($id = $this->checkTaskId($id)) { $task = new \CTaskItem($id, $USER->GetId()); $task->accept(); } return $result; }