Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v diff -u -r1.44 -r1.45 --- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 25 Sep 2003 14:25:01 -0000 1.44 +++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 28 Sep 2003 01:22:39 -0000 1.45 @@ -1240,24 +1240,24 @@ return [array get result] } -ad_proc -public auth::local_account_ok_p { +ad_proc -public auth::get_local_account_status { {-user_id:required} } { - Return true or false (1 or 0) to whether the given user's account is ok. + Return 'ok', 'closed', or 'no_account' } { - set ok_p 0 + set result no_account catch { acs_user::get -user_id $user_id -array user - array set result [auth::check_local_account_status \ + array set check_result [auth::check_local_account_status \ -user_id $user_id \ -member_state $user(member_state) \ -email_verified_p $user(email_verified_p) \ -screen_name $user(screen_name) \ -password_age_days $user(password_age_days)] - set ok_p [expr [string equal $result(account_status) "ok"]] + set result $check_result(account_status) } - return $ok_p + return $result } ad_proc -private auth::get_user_secret_token { Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 25 Sep 2003 13:50:05 -0000 1.25 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 28 Sep 2003 01:22:57 -0000 1.26 @@ -179,7 +179,6 @@ set auth_token [lindex $login_list 2] set auth_level expired - set account_status closed # Check authentication cookie # First, check expiration @@ -197,8 +196,14 @@ } # Check account status - if { [auth::local_account_ok_p -user_id $untrusted_user_id] } { - set account_status ok + set account_status [auth::get_local_account_status -user_id $untrusted_user_id] + + ns_log Notice "LARS: account_status for user_id $untrusted_user_id is $account_status" + + if { [string equal $account_status "no_account"] } { + set untrusted_user_id 0 + set auth_level none + set account_status "closed" } }