summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
new file mode 100644
index 0000000..4533a85
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/ldap/ldap_authentication/README.txt
@@ -0,0 +1,40 @@
+
+
+
+=======================================
+PHP to Test for Allowed LDAP Users
+=======================================
+
+Two variables are available:
+
+(1) $_name - the username ldap server configuration has mapped user to such as "jdoe" etc. How this is derived is configured in ldap_servers module.
+
+
+
+(2) $_ldap_user_entry - their ldap entry as returned from php ldap extension.
+
+$_ldap_user_entry is something like:
+
+array(
+ 'dn' => 'cn=jkool,ou=guest accounts,dc=ad,dc=myuniversity,dc=edu',
+ 'mail' => array( 0 => 'jkool@guests.myuniversity.edu', 'count' => 1),
+ 'sAMAccountName' => array( 0 => 'jkool', 'count' => 1),
+ 'memberOf' => array( 0 => 'cn=sysadmins,ou=it,dc=ad,dc=myuniversity,dc=edu', 'count' => 1),
+ );
+
+
+Result should print 1 for allowed or 0 for disallowed. The function used to evaluate the code is php_eval() in php.module
+
+---------------------------------
+Examples:
+
+
+//exclude users with guests.myuniversity.edu email address
+if (strpos($_ldap_user_entry['attr']['mail'][0], '@guests.myuniversity.edu') === FALSE) {
+ print 1;
+}
+else {
+ print 0;
+}
+
+