98 Commits

Author SHA1 Message Date
skodak
4630e4e483 Bug #5953 - problem in /auth/ldap/lib.php; merged from MOODLE_16_STABLE 2006-06-29 07:05:00 +00:00
martinlanghoff
9aad454299 auth/ldap: better handling of empty values from ldap 2006-05-30 00:44:21 +00:00
skodak
f2b5a58a0f Bug #5604 - LDAP error notice when users update profile; merged from MOODEL_16_STABLE 2006-05-24 21:12:46 +00:00
stronk7
5c30945a81 Only decode from utf8 if we aren't running under utf8.
(anyway we need a setting to decide the original encoding
and to be perfect)
2006-03-28 19:14:23 +00:00
stronk7
5db97a46a5 We don't need to convert to Unicode if Moodle is running under Unicode.
(anyway, we need a new field inside each authentication system to be
able to define the external encoding!)
2006-03-28 17:13:09 +00:00
moodler
0b5f5c0de0 Some old fix, that wasn't checked in 2006-01-05 06:30:12 +00:00
martinlanghoff
ff2cbb73a9 Merged from MOODLE_15_STABLE - auth/ldap: Fix support for AD -- thanks to Inaki, in more than one sense ;-) 2005-12-12 04:58:11 +00:00
martinlanghoff
a4e3e98f08 Merged from MOODLE_15_STABLE - Updated the definition of member for AD - thanks to Inaki for the tip! 2005-11-07 01:00:05 +00:00
martinlanghoff
85523834e7 auth/ldap: Better warnings and handling of updaging multi-source LDAP fields
+ Raise a warning if the auth_ldap_get_entries for one user record
   returns more than one record (!?)
 + Resolved some subtle bugs when updating a remote LDAP repo from user
   updates. The logic is now simpler too.
 + Simplified the code that compares old/new values

Merged from MOODLE_15_STABLE
2005-11-07 00:53:07 +00:00
martinlanghoff
33b29afb8f Merged from MOODLE_15_STABLE - Fix for bug 3141 - Can't update external data with LDAP authentication 2005-10-06 02:24:03 +00:00
martinlanghoff
16582b8500 Merged from MOODLE_15_STABLE - Fix for bug 3992 - LDAP password including a quote does not work - credits go to Kita 2005-10-06 02:19:38 +00:00
martinlanghoff
8be24a07d0 auth/ldap: Merging pending patches from MOODLE_15_STABLE 2005-10-06 02:11:34 +00:00
thepurpleblob
541ff6ab16 Change of plan. Change password stuff moved to admin/auth.php 2005-09-22 14:19:39 +00:00
thepurpleblob
fd9c86c592 Whoops - should have been a text field
...and fixed some more dodgy xhtml on <input> tags.
2005-09-21 15:19:53 +00:00
thepurpleblob
522b9982c7 Changed config initialisation so it doesn't use optional_variable() function.
Fixed a couple of non-xhtml <br>s
Added authchangepasswordurl config parameter (ongoing improvements to
'multiple' auth methods functionality)
2005-09-21 14:58:41 +00:00
martinlanghoff
98ee505608 Merged from MOODLE_15_STABLE - auth/ldap: fixed typo in auth_user_activate() - bug #3594 - thanks to ze @ nbox.org 2005-09-09 00:28:09 +00:00
martinlanghoff
cb2b145f50 Merged from MOODLE_15_STABLE - auth/ldap - sync_users script bugfix x2: it was deleting fields that were not supposed to be synched to ldap and it was failing to set auth_forcepasswordchange 2005-09-02 06:56:32 +00:00
martinlanghoff
b8a0a101e5 Merged from MOODLE_15_STABLE - auth/ldap: Fixed handling of multi-source field mapping. Now fields with non-empty values have precedence over empty fields, regardless of order. Fields will be set to empty only if all ldap source fields are empty. 2005-08-25 04:58:59 +00:00
martinlanghoff
1ec75a2446 Merged from MOODLE_15_STABLE - Temp table now matches idnumber length with username - thanks to Yves Roy for pointing this out. 2005-08-12 02:31:34 +00:00
martinlanghoff
2a37498d85 Merged from MOODLE_15_STABLE - Fix for small syntax error that was hiding debug info from an error msg. #3527 - Credits to cangussu@gmail.com 2005-08-11 23:02:40 +00:00
martinlanghoff
b957a44bb6 Merged from MOODLE_15_STABLE - Fix for using dn as idnumber - thanks to Jeff Graham - http://moodle.org/mod/forum/discuss.php?d=28840 2005-08-11 22:48:33 +00:00
stronk7
bd8a4f07f0 One help string corrected.
Merged from MOODLE_15_STABLE
2005-07-14 15:44:34 +00:00
stronk7
f5686a5839 Interface for SC#106
Merged from MOODLE_15_STABLE
2005-07-14 15:25:43 +00:00
martinlanghoff
a40803130b Per-auth-backend field locks support. Merged from MOODLE_15_STABLE
* Extended set_config()
 * Implemented get_config() which takes over $CFG loading in setup.php
 * admin/auth.php has special handling if post vars starting in pluginconfig_
 * admin/auth.php print_auth_lock_options() prints a form fragment -- being called from most plugins now
 *  user/edit.php follows the new convention when locking down fields, both javascript UI and on POST.
 * admin/auth: More solid checking for auth GET/POST var.
 * admin/auth: print_auth_lock_options() now handles user field mapping options for LDAP and similar modules
 * admin/auth: user mapping options have moved to config_plugins table
 * auth/ldap module has migrated to using new field mapping vars -- simplified config.html a lot
 * auth settings migration to config_plugins
2005-06-02 05:39:41 +00:00
thepurpleblob
6e8503ab38 Incorrect variable name used for parameter. 2005-05-18 13:15:21 +00:00
martinlanghoff
22693f4aff Auth/LDAP -- a proper dropdown for search subcontexts option 2005-05-17 03:50:20 +00:00
stronk7
ef9b35a01b Tabs are out 2005-05-16 19:38:21 +00:00
paca70
e8a7fa9afd Added missing argumet 2005-04-04 10:16:28 +00:00
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