title: Disable auto-login after student registration in Tutor LMS
body: <p>How do I stop WordPress auto-login after completing a new student registration in Tutor LMS? I think tutor_before_student_reg_form, tutor_student_reg_form_end, tutor_after_student_reg_form are functions that have something to do with it but I do not know where to find them.</p>
  <p>Can anyone please give a lead? Thanks!</p>
  <p>Here is my code:</p>
  <pre><code>&lt;?php
  /**
   * @package TutorLMS/Templates
   * @version 1.4.3
   */
  
  ?&gt;
  
  &lt;?php if(!get_option( 'users_can_register', false )): ?&gt; 
      &lt;?php 
          $args = array(
              'image_path'    =&gt; tutor()-&gt;url.'assets/images/construction.png',
              'title'         =&gt; __('Oooh! Access Denied', 'tutor'),
              'description'   =&gt; __('You do not have access to this area of the application. Please refer to your system  administrator.', 'tutor'),
              'button'        =&gt; array(
                  'text'      =&gt; __('Go to Home', 'tutor'),
                  'url'       =&gt; get_home_url(),
                  'class'     =&gt; 'tutor-btn'
              )
          );
          tutor_load_template('feature_disabled', $args); 
      ?&gt;
  &lt;?php else: ?&gt;
  
  &lt;?php do_action('tutor_before_student_reg_form');?&gt;
  
      &lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot; id=&quot;tutor-registration-from&quot;&gt;
          &lt;input type=&quot;hidden&quot; name=&quot;tutor_course_enroll_attempt&quot; value=&quot;&lt;?php echo isset( $_GET['enrol_course_id'] ) ? (int)$_GET['enrol_course_id'] : '';?&gt;&quot;&gt;
          &lt;?php do_action('tutor_student_reg_form_start');?&gt;
  
          &lt;?php wp_nonce_field( tutor()-&gt;nonce_action, tutor()-&gt;nonce ); ?&gt;
          &lt;input type=&quot;hidden&quot; value=&quot;tutor_register_student&quot; name=&quot;tutor_action&quot;/&gt;
  
          &lt;?php
          
          $errors = apply_filters('tutor_student_register_validation_errors', array());
          if (is_array($errors) &amp;&amp; count($errors)){
              echo '&lt;div class=&quot;tutor-alert-warning tutor-mb-12&quot;&gt;&lt;ul class=&quot;tutor-required-fields&quot;&gt;';
              foreach ($errors as $error_key =&gt; $error_value){
                  echo &quot;&lt;li&gt;{$error_value}&lt;/li&gt;&quot;;
              }
              echo '&lt;/ul&gt;&lt;/div&gt;';
          }
          ?&gt;
  
          &lt;div class=&quot;tutor-form-row&quot;&gt;
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('First Name', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;text&quot; name=&quot;first_name&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('first_name')) ; ?&gt;&quot; placeholder=&quot;&lt;?php _e('First Name', 'tutor'); ?&gt;&quot; required autocomplete=&quot;given-name&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('Last Name', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;text&quot; name=&quot;last_name&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('last_name')); ?&gt;&quot; placeholder=&quot;&lt;?php _e('Last Name', 'tutor'); ?&gt;&quot; required autocomplete=&quot;family-name&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  
          &lt;div class=&quot;tutor-form-row&quot;&gt;
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('User Name', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;text&quot; name=&quot;user_login&quot; class=&quot;tutor_user_name&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('user_login')); ?&gt;&quot; placeholder=&quot;&lt;?php _e('User Name', 'tutor'); ?&gt;&quot; required autocomplete=&quot;username&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('E-Mail', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('email')); ?&gt;&quot; placeholder=&quot;&lt;?php _e('E-Mail', 'tutor'); ?&gt;&quot; required autocomplete=&quot;email&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
  
          &lt;div class=&quot;tutor-form-row&quot;&gt;
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('Password', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;password&quot; name=&quot;password&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('password')); ?&gt;&quot; placeholder=&quot;&lt;?php _e('Password', 'tutor'); ?&gt;&quot; required autocomplete=&quot;new-password&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class=&quot;tutor-form-col-6&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                      &lt;label&gt;
                          &lt;?php _e('Password confirmation', 'tutor'); ?&gt;
                      &lt;/label&gt;
  
                      &lt;input type=&quot;password&quot; name=&quot;password_confirmation&quot; value=&quot;&lt;?php esc_attr_e(tutor_utils()-&gt;input_old('password_confirmation')); ?&gt;&quot; placeholder=&quot;&lt;?php _e('Password Confirmation', 'tutor'); ?&gt;&quot; required autocomplete=&quot;new-password&quot;&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  
          &lt;div class=&quot;tutor-form-row&quot;&gt;
              &lt;div class=&quot;tutor-form-col-12&quot;&gt;
                  &lt;div class=&quot;tutor-form-group&quot;&gt;
                  &lt;?php
                      //providing register_form hook
                      do_action('tutor_student_reg_form_middle');
                      do_action('register_form');
                  ?&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;    
  
          &lt;?php do_action('tutor_student_reg_form_end');?&gt;
  
          &lt;?php
              $tutor_toc_page_link = tutor_utils()-&gt;get_toc_page_link();
          ?&gt;
          
          &lt;?php if( null !== $tutor_toc_page_link ) : ?&gt;
              &lt;div class=&quot;tutor-mb-24&quot;&gt;
                  &lt;?php _e( 'By signing up, I agree with the website\'s', 'tutor' ) ?&gt; &lt;a target=&quot;_blank&quot; href=&quot;&lt;?php echo $tutor_toc_page_link?&gt;&quot; title=&quot;&lt;?php _e('Terms and Conditions', 'tutor'); ?&gt;&quot;&gt;&lt;?php _e('Terms and Conditions', 'tutor'); ?&gt;&lt;/a&gt;
              &lt;/div&gt;
          &lt;?php endif; ?&gt;
  
          &lt;div&gt;
              &lt;button type=&quot;submit&quot; name=&quot;tutor_register_student_btn&quot; value=&quot;register&quot; class=&quot;tutor-btn tutor-btn-primary&quot;&gt;&lt;?php _e('Register', 'tutor'); ?&gt;&lt;/button&gt;
          &lt;/div&gt;
  
      &lt;/form&gt;
      &lt;?php do_action('tutor_after_student_reg_form');?&gt;
  &lt;?php endif; ?&gt;
  </code></pre>