Index: openacs-4/packages/acs-subsite/lib/login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/login.tcl,v diff -u -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/acs-subsite/lib/login.tcl 19 Jul 2004 18:39:40 -0000 1.21.2.1 +++ openacs-4/packages/acs-subsite/lib/login.tcl 22 Jul 2004 10:30:35 -0000 1.21.2.2 @@ -16,7 +16,8 @@ set self_registration [parameter::get_from_package_key \ -package_key acs-authentication \ - -parameter AllowSelfRegister] + -parameter AllowSelfRegister \ + -default 1] if { ![exists_and_not_null package_id] } { set subsite_id [subsite::get_element -element object_id] Index: openacs-4/packages/acs-subsite/lib/user-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-info.tcl,v diff -u -r1.11.4.1 -r1.11.4.2 --- openacs-4/packages/acs-subsite/lib/user-info.tcl 19 Mar 2004 09:24:45 -0000 1.11.4.1 +++ openacs-4/packages/acs-subsite/lib/user-info.tcl 22 Jul 2004 10:30:35 -0000 1.11.4.2 @@ -108,7 +108,16 @@ ]] } +# Get info from eabis +set organization "" +set position "" +set institution_short_name "" +set responsibilities "" +set role "" + +db_0or1row get_eabis_info "select organization,position,institution_short_name,responsibilities,role from eabis_user_info where user_id = :user_id" + ad_form -extend -name user_info -form { {url:text,optional {label "[_ acs-subsite.Home_page]"} @@ -121,6 +130,28 @@ {mode $elm_mode(bio)} {display_value {[ad_text_to_html -- $user(bio)]}} } + {organization:text + {label "Organization"} + {html {size 50}} + } + {institution_short_name:text,optional + {label "Short Name"} + {html {size 30}} + } + {position:text + {label "Position"} + {html {size 50}} + } + {responsibilities:text,optional + {label "Responsibilities"} + {html {size 50}} + } + {role:text(select) + {label "Role"} + {options {{Academic academic} {Corporate corporate} {Student student} {Staff staff} {Other other}}} + } + + } -on_request { foreach var { authority_id first_names last_name email username screen_name url bio } { set $var $user($var) @@ -158,6 +189,11 @@ break } } + + if [catch {db_dml eabis_user_info_insert "insert into eabis_user_info (organization,position,institution_short_name,responsibilities,role,user_id) values (:organization,:position,:institution_short_name,:responsibilities,:role,:user_id)"}] { + db_dml eabis_user_info "update eabis_user_info set organization=:organization, position=:position, institution_short_name=:institution_short_name, responsibilities=:responsibilities, role=:role where user_id=:user_id" + } + } -after_submit { if { [string equal [ad_conn account_status] "closed"] } { auth::verify_account_status Index: openacs-4/packages/acs-subsite/lib/user-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/user-new.tcl,v diff -u -r1.5.4.2 -r1.5.4.3 --- openacs-4/packages/acs-subsite/lib/user-new.tcl 19 Jul 2004 18:39:40 -0000 1.5.4.2 +++ openacs-4/packages/acs-subsite/lib/user-new.tcl 22 Jul 2004 10:30:35 -0000 1.5.4.3 @@ -63,6 +63,28 @@ } } +ad_form -extend -name register -form { + {organization:text + {label "Organization"} + {html "size 30"} + } + {institution_short_name:text,optional + {label "Short Name"} + {html {size 30}} + } + {position:text + {label "Position"} + {html {size 50}} + } + {responsibilities:text,optional + {label "Responsibilities"} + {html {size 50}} + } + {role:text(select) + {label "Role"} + {options {{Academic academic} {Corporate corporate} {Student student} {Staff staff} {Other other}}} + } +} ad_form -extend -name register -on_request { # Populate elements from local variables @@ -92,7 +114,10 @@ } } + # Insert eabis user information + db_dml eabis_user_info "insert into eabis_user_info (organization, position,user_id,institution_short_name,responsibilities,role) values (:organization,:position,:user_id,:institution_short_name,:responsibilities,:role)" + # Handle registration problems switch $creation_info(creation_status) { @@ -131,10 +156,6 @@ if { ![empty_string_p $next_url] } { # Add user_id and account_message to the URL - if { $creation_info(generated_pwd_p) } { - set password $creation_info(password) - } - ad_returnredirect [export_vars -base $next_url {user_id password {account_message $creation_info(account_message)}}] ad_script_abort }