From ba7166c3772f8ae09ec25025587308398da3d407 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 22 Sep 2003 13:58:20 +0000 Subject: [PATCH] Added is_internal_auth() function to quickly identify internal authentication --- lib/moodlelib.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index ebe34ca90d..66e65c2e79 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -524,6 +524,13 @@ function get_moodle_cookie() { } } +function is_internal_auth() { +/// Returns true if an internal authentication method is being used. + + global $CFG; + + return ($CFG->auth == "email" || $CFG->auth == "none" || $CFG->auth == "manual"); +} function create_user_record($username, $password) { /// Creates a bare-bones user record -- 2.39.5