• Resolved cope916

    (@cope916)


    I was having some problems where logged in users were still seeing the age gate pop-up even though I have the option set for logged in users not to have to verify their age. I switched to the JS version to see if it helped and it didn’t fix the problem. I wasn’t able to recreate the problem until today when I experienced the issue myself. I temporarily disabled the plugin just so my users can access the content they are trying to since some were saying they were still seeing the age gate pop up while logged in and even after they submit their date of birth. Any ideas on what may be going on?

    Thanks so much for an otherwise perfect plugin!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Phil

    (@philsbury)

    Hi @cope916,

    Sorry you’re having issues, I’ve not seen this before.

    A couple of questions to help me tray and work this one out;

    Do you have any caching enabled?
    How are you handling user log ins?
    Is it for every user type?
    Is it on every page/post type?

    The standard and JS versions handle this in different ways too. The JS relies on a ‘logged-in’ class on the body, whereas standard should use the is_user_logged_in() function (though I’m actually struggling to find it in the code despite it working for me!)

    Let me know on the above and I’ll try and figure things out. If you have a link too that’d be great as I can have a look and see if I can reproduce it.

    There’s an update coming this week, but I don’t think I’ll be able to do any fixes for this in time for that, but it’ll be in the next one if I can find the issue.

    Thanks
    Phil

    Plugin Author Phil

    (@philsbury)

    Hi again,

    I’ve worked this out, seems it was totally missing for some reason. It’ll be in the next release for a fixe (hopefully tomorrow).

    Until then you could add this to your functions.php or a plugin to get the functionality working:

    
    add_filter('age_gate_restricted', 'ignore_logged_in');
    
    function ignore_logged_in($restricted){
      if (is_user_logged_in()) {
        $restricted = false;
      }
      return $restricted;
    }
    

    As I say, hopefully have the release out tomorrow.

    Thanks
    Phil

    Thread Starter cope916

    (@cope916)

    Seems to be working like a champ again! Thank you! Do you have a link or something so I can donate towards a beer or two?

    Plugin Author Phil

    (@philsbury)

    Great stuff. Official fix should be out later today.

    There’s a donate link on the plugins screen, or you can follow this link. Anything greatly appreciated 🙂

    Thanks
    Phil

    Thread Starter cope916

    (@cope916)

    Thanks again Phil

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Age Gate for Registered Users’ is closed to new replies.