From 06757c299433d6bf85966b481af3db185016a75b Mon Sep 17 00:00:00 2001
From: Yannick Warnier
-If you wish, you can give teacher/student status to dokeos users according to settings in the ldap server.
-This is not a standard field however, so you'll have to change some code.
-main/auth/ldap/ldap_var.inc.php
-around line 189, function putUserInfoInDokeos ($login, $infoArray)
-
-if (your criterium)
-If this seems too difficult, the simplest solution is to just put
-$statut = STUDENT; and give course manager rights through the administration section.
-
+By default, Dokeos will check if the "employeenumber" field has a value. If it has, then Dokeos will
+consider this user as being a teacher.
-Some LDAP servers do not support anonymous use of the directory services
-In this case, you need code that binds with a name and password - this code has already been provided,
-just ask on a forum or email for this.
+
+
Debugging
diff --git a/documentation/installation_guide.html b/documentation/installation_guide.html
index dc5c2a4af9..c707183962 100644
--- a/documentation/installation_guide.html
+++ b/documentation/installation_guide.html
@@ -370,55 +370,28 @@ Ask the LDAP server admin for the settings:
-
-
-//parameters for LDAP module
-$usesLDAP = TRUE;
-$usesCurriculum = FALSE;
-$ldaphost = "myldapserver.com"; // your ldap server
-$ldapport = 389; // your ldap server's port number
-$ldapDc = "dc=xx, dc=yy, dc=zz"; //domain
+As an example, you should find the following kind of values:
+LDAP main server's address: "myldapserver.com"; // your ldap server
+LDAP main server's port: 389; // your ldap server's port number
+LDAP domain: "dc=xx, dc=yy, dc=zz"; //domain
Teacher/student status
-{
- $statut = STUDENT;
-}
-else
-{
- $statut = COURSEMANAGER;
-}
-
+If you want to change this behaviour, you can edit main/auth/ldap/authldap.php, function ldap_put_user_info_locally(),
+and change the if (empty($info_array[$tutor_field])) condition to whatever suits you.
+You can also remove this check by removing the condition and leaving only the $status = STUDENT; line.
Protected LDAP servers
+In this case, you should fill in the appropriate fields in the administration panel (e.g. "manager" and "mypassword") and Dokeos will try to authenticate using these, or fall back to anonymous mode before giving up.