Index: openacs-4/packages/dotlrn/www/register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/register.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/dotlrn/www/register.tcl 29 Sep 2013 13:49:45 -0000 1.16 +++ openacs-4/packages/dotlrn/www/register.tcl 1 Nov 2013 21:08:32 -0000 1.17 @@ -27,7 +27,7 @@ {referer "./"} } -if { ! [parameter::get -parameter SelfRegistrationP -package_id [dotlrn::get_package_id] -default 1] } { +if { ![parameter::get -parameter SelfRegistrationP -package_id [dotlrn::get_package_id] -default 1] } { set redirect_to [parameter::get -parameter SelfRegistrationRedirectTo -package_id [dotlrn::get_package_id] -default ""] if { $redirect_to ne "" } { @@ -38,13 +38,13 @@ ad_script_abort } -ad_maybe_redirect_for_registration +auth::require_login -if {[empty_string_p $community_id]} { +if {$community_id eq ""} { set community_id [dotlrn_community::get_community_id] } -if {[empty_string_p $user_id]} { +if {$user_id eq ""} { set user_id [ad_conn user_id] } else { dotlrn::require_user_admin_community -community_id $community_id @@ -61,8 +61,11 @@ # This should prevent most double clicks, leaving # the catch below to trap the rest. -if { [dotlrn_community::member_p $community_id $user_id] || \ - ([string equal $join_policy "needs approval"] && [dotlrn_community::member_pending_p -community_id $community_id -user_id $user_id]) } { +if { [dotlrn_community::member_p $community_id $user_id] || + ($join_policy eq "needs approval" + && [dotlrn_community::member_pending_p -community_id $community_id -user_id $user_id] + ) + } { ad_returnredirect $referer ad_script_abort }