Index: openacs-4/packages/acs-subsite/www/register/recover-password.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/recover-password.tcl,v diff -u -r1.12 -r1.12.6.1 --- openacs-4/packages/acs-subsite/www/register/recover-password.tcl 20 Nov 2009 21:39:09 -0000 1.12 +++ openacs-4/packages/acs-subsite/www/register/recover-password.tcl 27 Aug 2013 12:20:38 -0000 1.12.6.1 @@ -30,7 +30,7 @@ # Display form to collect username and authority set authority_options [auth::authority::get_authority_options] -if { ![exists_and_not_null authority_id] } { +if { (![info exists authority_id] || $authority_id eq "") } { set authority_id [lindex [lindex $authority_options 0] 1] } @@ -60,7 +60,7 @@ ad_form -extend -name recover -form [list [list username:text($username_widget) [list label "Username"]]] -validate { {username - { ![empty_string_p [acs_user::get_by_username -authority_id $authority_id -username $username]] } + { [acs_user::get_by_username -authority_id $authority_id -username $username] ne "" } { Could not find username at authority } } } @@ -80,7 +80,7 @@ # We handle form submission here, because otherwise we can't handle both the case where we use the form # and the case where we don't in one go -if { [form is_valid recover] || (![form is_submission recover] && ([exists_and_not_null username] || [exists_and_not_null email])) } { +if { [form is_valid recover] || (![form is_submission recover] && (([info exists username] && $username ne "") || ([info exists email] && $email ne ""))) } { array set recover_info [auth::password::recover_password \ -authority_id $authority_id \ -username $username \