public/wordpress/wp-content/plugins/wp-courseware/includes/core/session.php
/**
	 * Generate Student Id.
	 *
	 * Generate a unique student ID for guests (if any), or return user ID if logged in.
	 * Uses Portable PHP password hashing framework to generate a unique cryptographically strong ID.
	 *
	 * @since 4.3.0
	 *
	 * @return string The generated student id.
	 */
Generate Student Id.
Generate a unique student ID for guests (if any), or return user ID if logged in.
Uses Portable PHP password hashing framework to generate a unique cryptographically strong ID.



@return string The generated student id.
Generate Student Id . Generate a unique student ID for guests ( if any ) or return user ID if logged in . Uses Portable PHP password hashing framework to generate a unique cryptographically strong ID . @return string The generated student id .
public function generate_student_id() {
		$student_id = '';
		if ( is_user_logged_in() ) {
			$student_id = get_current_user_id();
		}
		if ( empty( $student_id ) ) {
			require_once ABSPATH . 'wp-includes/class-phpass.php';
			$hasher     = new \PasswordHash( 8, false );
			$student_id = md5( $hasher->get_random_bytes( 32 ) );
		}
		return $student_id;
	}
public function generate_student_id ( ) { $ student_id = '' ; if ( is_user_logged_in ( ) ) { $ student_id = get_current_user_id ( ) ; } if ( empty ( $ student_id ) ) { require_once ABSPATH . 'wp-includes/class-phpass.php' ; $ hasher = new \ PasswordHash ( 8 , false ) ; $ student_id = md5 ( $ hasher -> get_random_bytes ( 32 ) ) ; } return $ student_id ; }
Generate Student Id.
Generate Student Id .