Index: openacs-4/packages/ims-ent/tcl/dotlrn-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ims-ent/tcl/dotlrn-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ims-ent/tcl/dotlrn-procs.tcl 11 Jun 2004 23:02:21 -0000 1.1 +++ openacs-4/packages/ims-ent/tcl/dotlrn-procs.tcl 13 Jul 2004 01:12:41 -0000 1.2 @@ -3,6 +3,7 @@ ad_library { specific library for Galileo University needs + Might help as a reference for other users of this pkg @author Rocael Hernandez Rizzardini (roc@viaro.net) @creation-date 2004-06-10 @@ -34,9 +35,19 @@ return set user_id [db_string get_user_id { - select user_id from carnets where carnet = :ims_id + select user_id from user_id_member_field_map where field_value = :ims_id } -default "" ] + if [empty_string_p $user_id] { + # try to authenticate this user (search on ldap & register locally) + + auth::authentication::Authenticate -authority_id $authority_id -username $ims_id -password $ims_id + + set user_id [db_string get_user_id { + select user_id from user_id_member_field_map where field_value = :ims_id + } -default "" ] + } + return $user_id } @@ -62,7 +73,7 @@ return db_dml set_carnet_type { - update carnets set type = :roletype + update user_id_member_field_map set field_name = :roletype where carnet = :carnet } }