120 Commits

Author SHA1 Message Date
martinlanghoff
989fa91059 Now CAS-supplied tokens can override LDAP auth - fixed 2005-03-16 10:23:16 +00:00
martinlanghoff
1f568ab426 Generalized more references to LDAP so as to be reusable by the CAS module 2005-03-16 09:17:00 +00:00
martinlanghoff
dd49e6f657 Now CAS-supplied tokens can override LDAP auth 2005-03-16 09:13:15 +00:00
martinlanghoff
56cfbcd5c9 Allow LDAP logic to be reused by other modules 2005-03-15 20:52:34 +00:00
martinlanghoff
fc44d2121f Fixed a misnamed/renamed variable probably due to a recent merge from stable that used the old var name. 2005-03-14 19:34:21 +00:00
paca70
879d932815 Fixed mistake on url-trimming and added some debug info. 2005-03-09 20:24:13 +00:00
martinlanghoff
cecfc11d81 Merged from MOODLE_14_STABLE - Better handling of trailing semicolons and spaces in LDAP configs. Fixes a regression from 1.4.2, plus fixed typo: == should be = 2005-03-01 03:10:34 +00:00
moodler
f0fd3436be Some cleanups just to make these pages look acceptable 2005-02-09 12:55:34 +00:00
martinlanghoff
b36a8fc4f5 Auth/LDAP
Bugfix - value truncation to fit Moodle database
- Added truncate_userinfo() to cleanup data coming from external auth
- Fixed auth_user_create() to truncate user info as appropriate

Auth_ldap_user_sync
- created external script that calls the function
- much faster update strategy on postgres and mysql: auth_sync_users now to uses bulk inserts into a temp table, and then use LEFT JOINs and plain old SELECTs to determine what users it has to insert.
- we now loop over smaller sets of data -- we are still memory-bound, but (a) it'll be easy to use LIMIT to manage that and (b) memory use is much lower now in all cases.
- postgres: phased commits in auth_user_sync() for the batch user upload phase
- Several feature and performance enhancements:
  - if a value is removed from ldap, it will be cleared from moodle
  - no-op updates (where the data does not change) are skipped
  - if a user disappears and then reappears in LDAP in two separate calls to auth_user_sync(),the account will be marked deleted and then be revived. before, the account would have been deleted and created anew.

Multi-source ldap values:

The LDAP auth module now accepts a comma separated set of LDAP field names. When creating or updating a user record, auth/ldap will retrieve all the relevant fields. The right-most values overwrites all the others.

This is particularly useful when updating the user's email address from an LDAP source, which may contain the email address in one of several fields (traditionally: mail, mailForwardingAddress, mailAlternateAddress).

If a value is updated and is set to update external auth and this field is using this multi-source ldap configuration, the auth/ldap module will retrieve the old value, find which field it was sourced from, and update that field in LDAP. If it fails to find the original source of the value, it will log it in error_log.


Log of patchsets applied:
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-131
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-137
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-139
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-172
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-173
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-189
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-190
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-208
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-212
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-216
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-279
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-282
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-287
	arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-294
2004-11-22 07:46:10 +00:00
martinlanghoff
c95aa089a8 Merged from MOODLE_14_STABLE: Fixing handling of empty memory_limit for PHP without memory_limit (mostly Windows binaries) 2004-11-20 10:38:43 +00:00
paca70
8021cc54c1 Allow config how aliases are derefered. 2004-11-08 18:13:00 +00:00
paca70
52192a5ce7 Prevent error messages when username is not member of group 2004-11-08 10:55:57 +00:00
paca70
585c23419d Some more code to support password expiration 2004-10-28 11:40:55 +00:00
paca70
e0f5a5be1d Allow auth_ldap_connect() to take binddn ja bindpwd
CVS: ----------------------------------------------------------------------
2004-10-18 16:33:25 +00:00
paca70
e472709ddd Usersync is almost working now. Only unescaped dots etc.. can broke
database updates.
2004-10-17 18:04:26 +00:00
paca70
986feea0b8 Sync is almost working now... 2004-10-15 07:24:10 +00:00
paca70
6c7f68c73d Firstsync seems to work, but basic sync is broken right now.
I'll return to this in two days.
2004-10-14 11:31:53 +00:00
paca70
3d449701d0 More updates... auth_sync_users will work dome day.... 2004-10-14 10:43:59 +00:00
paca70
b7af1ee832 Checked in some work with user syncronization 2004-10-14 10:03:38 +00:00
paca70
d0e2f755ea Some updates to sync code 2004-10-14 05:06:35 +00:00
paca70
fb9206ca09 Started rewrite of auth_sync_users 2004-10-13 12:23:20 +00:00
paca70
911aba7dd8 Return null in case creators are not defined 2004-10-13 06:50:13 +00:00
paca70
e542033a19 Added selective user disable, activate and creation. 2004-10-10 07:54:42 +00:00
paca70
2be3872c88 Moved configuration defaults to new function auth_ldap_getdefaults()
Now the information can be used anywhere. config.html comes to mind at first.
2004-10-01 04:39:03 +00:00
paca70
8347b5628a Corrections to phpdoc comments. 2004-09-30 18:38:40 +00:00
paca70
13dcf22d39 Added phpdoc comments
Moved from ldap_get_entries to binarysafe auth_ldap_get_entries().

Added 'count'-attribute to auth_ldap_get_entries() result.
2004-09-30 11:34:38 +00:00
paca70
c72eac85d7 Added basic configuration for rfc2307bis 2004-09-28 12:50:33 +00:00
paca70
089b19f631 Fixed bug 2012
Started work with bug 2007
Bug 1969 is partacaly fixed. ldap-module supports now password expiration.
Some work with bugs 761 and 1730

Changes in login/index.php
Reordered some code to make variables reusable in multiple places.
Added redirection in case of expired password
2004-09-28 12:39:20 +00:00
paca70
d89430abdf Changes to configuration interface 2004-09-27 14:19:32 +00:00
paca70
65012195ef Fixed typo 2004-09-24 08:56:47 +00:00
paca70
686650dd3e Added easy interface to specify ldap-attribute types and objectclasses.
Just select ldap-server type and you are done. Old variables can still be used
to override builtin settings.
2004-09-24 06:49:57 +00:00
paca70
8dad1541a2 Added utf8_decode when reading info from ldap.
Thanks to stronk7 pointing this out.
2004-09-22 18:50:03 +00:00
paca70
026e8973a9 Fixed missed variable name 2004-09-22 11:33:41 +00:00
paca70
d43ced93fc Use only atrributes marked as "updateremote" when creating new ldap-users. 2004-09-22 11:06:42 +00:00
paca70
0b543a6508 Added support for multiiple ldap-servers.
When first server(s) are down there delay before connecting secondary servers.
	So you system feels slow if first server is down, but Moodle still authenticates to sedondary servers.

Other major change:
auth_ldap_bind fuction is removed.
	due phps ldap_connect() limitations auth_ldap_connect() does now also ldap_bind()
	to see if server is up.
2004-09-22 09:41:20 +00:00
paca70
8c9c0e8588 Cleaned config.html
Added configuration for expired passwords.
2004-09-22 08:28:56 +00:00
moodler
d35757eb25 Merged/cleaned changes from MOODLE_15_LDAP to HEAD ...
please don't use the MOODLE_15_LDAP branch any more.
2004-09-20 09:08:57 +00:00
gustav_delius
839f2456bb XHTML compliance
- fixed (hopefully) all <img> tags
- global replace on <br> to <br />
- &amp; in URLs
- got the forum module XHTML compliant
Julian Sedding
2004-09-16 17:13:57 +00:00
gustav_delius
7ef0797dea some fixes for XHTML compliance 2004-09-12 01:34:24 +00:00
moodler
9c945552fb Merged from stable 2004-09-02 18:13:50 +00:00
gustav_delius
ff9fe32584 removed some warnings from from fields, closing bug 1558 2004-08-20 20:32:38 +00:00
paca70
510ff12d14 Dont try to delete uses multiple times 2004-08-18 11:29:45 +00:00
paca70
a9fac242f2 Return auth type with userinfo 2004-08-18 11:11:39 +00:00
paca70
443398353c Added support for coursecreators in function auth_sync_users() 2004-08-16 04:56:47 +00:00
paca70
9566e4ce84 Moved groupmembership code from function auth_iscreator() to
generic private function auth_ldap_isgroupmember().
2004-08-16 04:41:51 +00:00
paca70
815002f07f while waiting that guid-field, I added two functions:
auth_get_users ()
        Returns all userobjects from external database, with userinformation
        like address, phone ...

auth_sync_users ()
        1. Adds users from externaldatabase to moodle.
        2. renamed user in moodles db if renamed in externaldb
        3. "Delete" user in moodles db if removed from externaldb

and configuration interface for guid. ;)
2004-08-15 17:46:30 +00:00
paca70
4b9c337598 Added configuration interface for value LDAP_objectclass 2004-08-15 16:12:19 +00:00
moodler
d8627a477e Thanks to Dave Lopata <Dave@Lopata.Net>, Moodle now supports LDAP 3 2004-04-15 15:57:32 +00:00
moodler
16b8fe5b7f Fixed some short tags 2003-09-09 05:37:39 +00:00
paca70
c46b0a23db Corrected some typos 2003-08-18 08:12:31 +00:00