| @@ 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 | ||
| @@ 1601-1615 (lines=15) @@ | ||
| 1598 | } |
|
| 1599 | ||
| 1600 | ||
| 1601 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) { |
|
| 1602 | $where['EVT_wp_user'] = get_current_user_id(); |
|
| 1603 | } else { |
|
| 1604 | if ( ! isset( $where['status'] ) ) { |
|
| 1605 | if ( ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_events', 'get_events' ) ) { |
|
| 1606 | $where['OR'] = array( |
|
| 1607 | 'status*restrict_private' => array( '!=', 'private' ), |
|
| 1608 | 'AND' => array( |
|
| 1609 | 'status*inclusive' => array( '=', 'private' ), |
|
| 1610 | 'EVT_wp_user' => get_current_user_id() |
|
| 1611 | ) |
|
| 1612 | ); |
|
| 1613 | } |
|
| 1614 | } |
|
| 1615 | } |
|
| 1616 | ||
| 1617 | if ( isset( $this->_req_data['EVT_wp_user'] ) ) { |
|
| 1618 | if ( $this->_req_data['EVT_wp_user'] != get_current_user_id() && EE_Registry::instance()->CAP->current_user_can( 'ee_read_others_events', 'get_events' ) ) { |
|