Reply To: Make the user login in browser when he login in app


Scott Lang

If the videos are accessible publicly thus they will access within the unit.

Add this code to your customizer plugin this will enable direct access to unit from app in-app browser

function enable_access_tostudents($flag,$post){ if(!empty($_GET) && !empty($_GET[‘access_token’])){
$token = urldecode ($_GET[‘access_token’]);
$course_id = $_GET[‘id’]; global $wpdb;
$user_id = $wpdb->get_var(“SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = ‘$token'”); if(!empty($user_id) && is_numeric($user_id)){ $check = wplms_user_course_active_check($user_id,$course_id);
return 0;
} }
return $flag;

After that go to the unit URL from app unit button click.