From 2e08204bce4944e56da9b365f6d297de6d75cab0 Mon Sep 17 00:00:00 2001 From: REJack Date: Wed, 1 Jun 2016 18:45:12 +0200 Subject: [PATCH] fixed `get_pm()` & `delete_pm()` --- application/libraries/Aauth.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 76914a8..76e46bd 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -2027,8 +2027,10 @@ class Aauth { } $query = $this->aauth_db->where('id', $pm_id); + $query = $this->aauth_db->group_start(); $query = $this->aauth_db->where('receiver_id', $user_id); - //$query = $this->aauth_db->or_where('sender_id', $user_id); + $query = $this->aauth_db->or_where('sender_id', $user_id); + $query = $this->aauth_db->group_end(); $query = $this->aauth_db->get( $this->config_vars['pms'] ); if ($query->num_rows() < 1) { @@ -2068,8 +2070,10 @@ class Aauth { } $query = $this->aauth_db->where('id', $pm_id); + $query = $this->aauth_db->group_start(); $query = $this->aauth_db->where('receiver_id', $user_id); $query = $this->aauth_db->or_where('sender_id', $user_id); + $query = $this->aauth_db->group_end(); $query = $this->aauth_db->get( $this->config_vars['pms'] ); $result = $query->row(); if ($user_id == $result->sender_id){