public/wordpress/wp-content/plugins/wp-courseware/includes/functions/students.php
/**
 * Login a student (set auth cookie and set global user object).
 *
 * @since 4.3.0
 *
 * @param int $student_id
 */
Login a student (set auth cookie and set global user object).


Login a student ( set auth cookie and set global user object ) .
function wpcw_set_student_auth_cookie( $student_id ) {
	global $current_user;
	$current_user = get_user_by( 'id', $student_id );
	wp_set_auth_cookie( $student_id, true );
}
function wpcw_set_student_auth_cookie ( $ student_id ) { global $ current_user ; $ current_user = get_user_by ( 'id' , $ student_id ) ; wp_set_auth_cookie ( $ student_id , true ) ; }
Login a student (set auth cookie and set global user object).
Login a student ( set auth cookie and set global user object ) .