]> git.mjollnir.org Git - moodle.git/commitdiff
Corrected some comments.
authorpaca70 <paca70>
Thu, 3 Oct 2002 15:55:45 +0000 (15:55 +0000)
committerpaca70 <paca70>
Thu, 3 Oct 2002 15:55:45 +0000 (15:55 +0000)
auth/ldap/lib.php

index c8eedf28f24aacd87c63fbf0d81f3ab557d2b140..b98b846f17b7a49fb5ca479d0fa48fa7422a34b9 100644 (file)
@@ -1,5 +1,6 @@
 <?PHP  
 //CHANGELOG:
+//03.10.2002 First version to CVS
 //29.09.2002 Clean up and splitted code to functions v. 0.02
 //29.09.2002 LDAP authentication functions v. 0.01
 //Distributed under GPL (c)Petri Asikainen 2002
@@ -45,8 +46,7 @@ function auth_get_userinfo($username){
   $ldap_connection=auth_ldap_connect();
        
   $moodleattributes = array();
-  // Commented out , does not work (why ?)     
-  //require("$CFG->wwwroot/auth/ldap/attr_mappings.php");
+  //atribute mappings between moodle and ldap
 
   $moodleattributes['firstname']    ='givenname';
   $moodleattributes['lastname']     ='sn';
@@ -127,21 +127,13 @@ function auth_ldap_find_userdn ($ldap_connection, $username){
   //default return value
   $ldap_user_dn = FALSE;
 
-
-  //$ldap_connection = auth_ldap_connect();
   auth_ldap_bind($ldap_connection);
-  
+
   //get all contexts and look for first matching user
   $ldap_contexts = explode(";",$CFG->ldap_contexts);
   
-  
-  
-      
   foreach($ldap_contexts as $context) {
     $context == trim($context);
-    //echo ("looking in context:".$context."<br>");
-    //echo ("filter :"."(".$CFG->ldap_user_attribute."=".$username.")". "<br>");
-    
     if($CFG->ldap_search_sub){
       //use ldap_search to find first user from subtree
       $ldap_result = ldap_search($ldap_connection, $context, "(".$CFG->ldap_user_attribute."=".$username.")");
@@ -161,7 +153,4 @@ function auth_ldap_find_userdn ($ldap_connection, $username){
   return $ldap_user_dn;
 }
 
-
-
-
 ?>