]> git.mjollnir.org Git - moodle.git/commitdiff
Added is_internal_auth() function to quickly identify internal authentication
authormoodler <moodler>
Mon, 22 Sep 2003 13:58:20 +0000 (13:58 +0000)
committermoodler <moodler>
Mon, 22 Sep 2003 13:58:20 +0000 (13:58 +0000)
lib/moodlelib.php

index ebe34ca90d1b4cd2b7f7a37ad151c63fb45b291c..66e65c2e7972989677f113d77ccc51c224d15e3e 100644 (file)
@@ -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