Browse Source

fixed `get_pm()` & `delete_pm()`

develop
REJack 9 years ago
parent
commit
2e08204bce
  1. 6
      application/libraries/Aauth.php

6
application/libraries/Aauth.php

@ -2027,8 +2027,10 @@ class Aauth {
} }
$query = $this->aauth_db->where('id', $pm_id); $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->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'] ); $query = $this->aauth_db->get( $this->config_vars['pms'] );
if ($query->num_rows() < 1) { if ($query->num_rows() < 1) {
@ -2068,8 +2070,10 @@ class Aauth {
} }
$query = $this->aauth_db->where('id', $pm_id); $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->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'] ); $query = $this->aauth_db->get( $this->config_vars['pms'] );
$result = $query->row(); $result = $query->row();
if ($user_id == $result->sender_id){ if ($user_id == $result->sender_id){

Loading…
Cancel
Save