Viewing 5 replies - 1 through 5 (of 5 total)
  • I totally agree. I went to Sensei LMS > Settings > General > Access Permissions and unchecked “Users must be logged into view lesson content.” but that doesn’t work.

    Found our answer = the uncheck works – after you add at least one lesson in your course. The “Register” button will still show, but lessons are unlocked (you can tell with icons).

    My fear is my-courses page has no re captcha while my normal registration page does….so this can easily lead to spam madness.

    See, even if you hide CSS “Register” button, or remove it all together, the default code is to populate my-courses url with registration, and you can’t just delete that page with the url my-courses because you are dependent on it to show the users All Courses | Active Courses | Completed Courses, so uncertain what my options are.

    • This reply was modified 3 years, 10 months ago by JJNW.

    Oh, there is a spam trap… <!– Spam Trap –>

    Mmmm….still figuring how I want this to be tweaked to my needs.

    Okay, I took out a bunch for code, then hide Register button with CSS. Even if a spammer bot decides to find the hidden Register, they would just go to a my-courses page, not registration.

    Code I took out was:

    // place on line 1120 class-sensei-frontend.php
    			if ( get_option( 'users_can_register' ) ) {
    				// get current url.
    				$action_url = get_permalink();
    				<div class="col-2">
    					<h2><?php esc_html_e( 'Register', 'sensei-lms' ); ?></h2>
    					<form method="post" class="register"  action="<?php echo esc_url( $action_url ); ?>" >
    						<?php do_action( 'sensei_register_form_start' ); ?>
    						<p class="form-row form-row-wide">
    							<label for="sensei_reg_username"><?php esc_html_e( 'Username', 'sensei-lms' ); ?> <span class="required">*</span></label>
    							<input type="text" class="input-text" name="sensei_reg_username" id="sensei_reg_username" value="<?php echo ( ! empty( $_POST['sensei_reg_username'] ) ) ? esc_attr( $_POST['sensei_reg_username'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification ?>" />
    						<p class="form-row form-row-wide">
    							<label for="sensei_reg_email"><?php esc_html_e( 'Email address', 'sensei-lms' ); ?> <span class="required">*</span></label>
    							<input type="email" class="input-text" name="sensei_reg_email" id="sensei_reg_email" value="<?php echo ( ! empty( $_POST['sensei_reg_email'] ) ) ? esc_attr( $_POST['sensei_reg_email'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification ?>" />
    						<p class="form-row form-row-wide">
    							<label for="sensei_reg_password"><?php esc_html_e( 'Password', 'sensei-lms' ); ?> <span class="required">*</span></label>
    							<input type="password" class="input-text" name="sensei_reg_password" id="sensei_reg_password" value="<?php echo ( ! empty( $_POST['sensei_reg_password'] ) ) ? esc_attr( $_POST['sensei_reg_password'] ) : ''; // phpcs:ignore WordPress.Security.NonceVerification ?>" />
    						<!-- Spam Trap -->
    						<div style="left:-999em; position:absolute;"><label for="trap"><?php esc_html_e( 'Anti-spam', 'sensei-lms' ); ?></label><input type="text" name="email_2" id="trap" tabindex="-1" /></div>
    						<?php do_action( 'sensei_register_form_fields' ); ?>
    						<?php do_action( 'register_form' ); ?>
    						<?php wp_nonce_field( 'sensei-register' ); ?>
    						<p class="form-row">
    							<input type="submit" class="button" name="register" value="<?php esc_attr_e( 'Register', 'sensei-lms' ); ?>" />
    						<?php do_action( 'sensei_register_form_end' ); ?>


    I want to turn off registration required for the lessons I’ve posted.

    To make all lessons visible without having to log in, you can uncheck the Access Permissions setting in Sensei LMS > Settings > General.

    As an alternative, you can also check the Allow this lesson to be viewed without login box in the Preview section of the sidebar of a lesson to make just that lesson visible.

    Hope that helps.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Turn off Required registration’ is closed to new replies.