Moodle Authentication

I went to the site by writing below code in a file xyz.php

. When I run this file, I visit the moodle site. Is there a way to log out similar to the below login code?

$user = authenticate_user_login($username, $password);
complete_user_login($user);

      

+3


source to share


1 answer


If you look at the file https://github.com/moodle/moodle/blob/master/login/logout.php you will see a call to the require_logout () function



This should ensure that the user is logged out.

0


source







All Articles