| @@ 1136-1148 (lines=13) @@ | ||
| 1133 | } |
|
| 1134 | ||
| 1135 | ||
| 1136 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_venues', 'get_venues' ) ) { |
|
| 1137 | $where['VNU_wp_user'] = get_current_user_id(); |
|
| 1138 | } else { |
|
| 1139 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' ) ) { |
|
| 1140 | $where['OR'] = array( |
|
| 1141 | 'status*restrict_private' => array( '!=', 'private' ), |
|
| 1142 | 'AND' => array( |
|
| 1143 | 'status*inclusive' => array( '=', 'private' ), |
|
| 1144 | 'VNU_wp_user' => get_current_user_id() |
|
| 1145 | ) |
|
| 1146 | ); |
|
| 1147 | } |
|
| 1148 | } |
|
| 1149 | ||
| 1150 | ||
| 1151 | ||
| @@ 1652-1666 (lines=15) @@ | ||
| 1649 | } |
|
| 1650 | ||
| 1651 | ||
| 1652 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) { |
|
| 1653 | $where['EVT_wp_user'] = get_current_user_id(); |
|
| 1654 | } else { |
|
| 1655 | if ( ! isset( $where['status'] ) ) { |
|
| 1656 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_events', 'get_events' ) ) { |
|
| 1657 | $where['OR'] = array( |
|
| 1658 | 'status*restrict_private' => array( '!=', 'private' ), |
|
| 1659 | 'AND' => array( |
|
| 1660 | 'status*inclusive' => array( '=', 'private' ), |
|
| 1661 | 'EVT_wp_user' => get_current_user_id() |
|
| 1662 | ) |
|
| 1663 | ); |
|
| 1664 | } |
|
| 1665 | } |
|
| 1666 | } |
|
| 1667 | ||
| 1668 | if ( isset( $this->_req_data['EVT_wp_user'] ) ) { |
|
| 1669 | if ( $this->_req_data['EVT_wp_user'] != get_current_user_id() && EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) { |
|