Index: openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 17 Feb 2003 15:53:33 -0000 1.8.2.2 +++ openacs-4/packages/acs-developer-support/tcl/acs-developer-support-procs.tcl 1 Apr 2003 22:17:23 -0000 1.8.2.3 @@ -68,7 +68,13 @@ ad_proc ds_user_switching_enabled_p {} { Returns whether user-switching is enabled. } { - return [nsv_get ds_properties user_switching_enabled_p] + if { ![nsv_exists ds_properties user_switching_enabled_p] } { + # This might happen when the init file setting up the nsv hasn't + # been sourced yet + return 0 + } else { + return [nsv_get ds_properties user_switching_enabled_p] + } } ad_proc ds_database_enabled_p {} {