Lines Matching defs:user_id
209 $sql .= ' thread_id=? AND removed=0 ORDER BY user_id';
215 $participants[$par['user_id']] = $par;
221 public function get_participant($user_id, $can_be_removed=false) {
226 $q = 'SELECT * FROM thread_participant WHERE thread_id=? AND user_id=?';
230 $r = $this->model->sqlite->query($q, $this->id, $user_id);
239 public function is_subscribent($user_id=null) {
240 if ($user_id == null) {
241 $user_id = $this->model->user_nick;
243 $par = $this->get_participant($user_id);
250 public function remove_participant_flags($user_id, $flags) {
256 $participant = $this->get_participant($user_id, true);
258 throw new ConsistencyViolationException("$user_id isn't participant");
268 $sql = "UPDATE thread_participant SET $set WHERE thread_id=? AND user_id=?";
269 $this->model->sqlite->query($sql, $this->id, $user_id);
273 public function set_participant_flags($user_id, $flags=array()) {
280 if (!$this->model->userFactory->exists($user_id)) {
281 throw new \Exception("$user_id isn't dokuwiki user");
289 $participant = $this->get_participant($user_id, true);
294 $participant['user_id'] = $user_id;
308 $q = "UPDATE thread_participant SET $set WHERE thread_id=? AND user_id=?";
309 $this->model->sqlite->query($q, $this->id, $user_id);
314 public function remove_participant($user_id) {
320 $participant = $this->get_participant($user_id);
322 throw new ConsistencyViolationException("$user_id isn't participant");
333 $q = "UPDATE thread_participant SET removed=1 WHERE thread_id=? AND user_id=?";
334 $this->model->sqlite->query($q, $this->id, $user_id);