| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function setCurrentUser(): void |
||
| 52 | { |
||
| 53 | if (! $this->current_user instanceof WP_User) { |
||
|
|
|||
| 54 | $this->current_user = wp_get_current_user(); |
||
| 55 | $event_manager_roles = array_keys($this->event_managers->roles()); |
||
| 56 | $current_user_roles = $this->current_user->roles; |
||
| 57 | $this->is_event_manager = ! empty(array_intersect($event_manager_roles, $current_user_roles)); |
||
| 58 | $this->is_logged_in = $this->current_user->ID !== 0; |
||
| 59 | } |
||
| 60 | } |
||
| 61 | |||
| 92 |