units are accessable w/o login

Home Forums Legacy Support Support queries Other issues units are accessable w/o login

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #228712
    singhal82
    Participant
    Hi pls refer to this course https://days14.com/course/basic-of-nature-photography/ the first unit is free http://prntscr.com/pehqfg and is accessible only after login but the same unit is easily accessible without restriction at direct link https://days14.com/unit/introduction-to-photography/
    #228863
    Mk
    Moderator
    Go to Wp-admin -> lms -> settings  -> and enable this setting http://prntscr.com/pev4ti
    #228898
    singhal82
    Participant
    Hi its already checked in if u select the unit from course, it ask for login problem is direct link of unit
    #228937
    Anshuman Sahu
    Keymaster
    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :     add_action('template_redirect','remove_unit_restriction_hook',1); function remove_unit_restriction_hook(){     if(!is_user_logged_in())       wp_die('Units are only accessible to logged in users');     }
    #230021
    IBSP
    Spectator
    It works for me But when i try to hit any direct link it shows the error of "Units are only Accessible" can you please fix this  
    #230071
    Mk
    Moderator
    Yes, we were showing the users that without login they can not access the unit. It's not an error, we were just showing instruction pop up to users. and this will pop only if a non-login user tries to access any unit directly.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘units are accessable w/o login’ is closed to new replies.