How do I reopen the (Popup Maker) after entering the correct password for a password protected page?

I solved the problem in this way.
Maybe someone will need it.

  1. Configured the modal window so that a cookie is created when the window is closed.
  2. Launched a modal window until the user closes the window and a cookie is created.

Here is the code:

...
if ( ! isset( $_COOKIE["pum-909"] ) ) { ?>
    <script>
        setTimeout(function() {
            PUM.open('909'); // This is my popup class "popmake-909"
        }, 1000);
    </script>
<?php }
...