user_factory = $user_factory; $this->user_storage = $user_storage; } /** * @inheritDoc */ public function handle() { try { if ( ! $this->user_storage->is_wp_user_set() ) { $this->user_storage->set_wp_user( $this->user_factory->create() ); } } catch ( User_Not_Found_Exception $e ) { } finally { return $this->next->handle(); } } }