| @@ -223,9 +223,11 @@ | ||
| 223 | 223 | * |
| 224 | 224 | * @return void |
| 225 | 225 | */ |
| 226 | 226 | protected function after_load(): void { |
| 227 | - $this->user_roles = array_values( $this->user_roles ); | |
| 227 | + $this->user_roles = array_values( $this->user_roles ); | |
| 228 | + $this->force_auth_roles = array_values( array_intersect( $this->force_auth_roles, $this->user_roles ) ); | |
| 229 | + $this->force_auth = array() !== $this->force_auth_roles; | |
| 228 | 230 | } |
| 229 | 231 | |
| 230 | 232 | /** |
| 231 | 233 | * Check if a plugin is in conflict with the current instance. |