_ >   55 55
  56 56 ad_form -name register -export {next_url user_id return_url} -form [auth::get_registration_form_elements]  -validate {
  57 57     {email
< >   58           {[string eq "" [party::get_by_email -email $email]]}
    58         {[string equal "" [party::get_by_email -email $email]]}
59 59         "[_ acs-subsite.Email_already_exists]"
  60 60     }
  61 61 }
 
101 101                                      -secret_question $secret_question \
  102 102                                      -secret_answer $secret_answer]
  103 103         
< >   104           if { [string equal $creation_info(creation_status) "ok"] && [exists_and_not_null rel_group_id] } {
    104         if { $creation_info(creation_status) eq "ok" && [exists_and_not_null rel_group_id] } {
105 105             group::add_member \
  106 106                 -group_id $rel_group_id \
  107 107                 -user_id $user_id \
 
144 144    
  145 145 } -after_submit {
  146 146    
< >   147       if { ![empty_string_p $next_url] } {
    147     if { $next_url ne "" } {
148 148         # Add user_id and account_message to the URL
  149 149        
  150 150         ad_returnredirect [export_vars -base $next_url {user_id password {account_message $creation_info(account_message)}}]
 
166 166         # lang::user::locale, as we are now a registered user,
  167 167         # but one without a valid locale setting.
  168 168         set locale [ad_get_cookie "ad_locale"]
< >   169           if { ![empty_string_p $locale] } {
    169         if { $locale ne "" } {
170 170             lang::user::set_locale $locale
  171 171             ad_set_cookie -replace t -max_age 0 "ad_locale" ""
  172 172         }
  173 173     }
  174 174    
  175 175     # Handle account_message
< >   176       if { ![empty_string_p $creation_info(account_message)] && $self_register_p } {
    176     if { $creation_info(account_message) ne "" && $self_register_p } {
< _   177 177         # Only do this if user is self-registering
  178 178         # as opposed to creating an account for someone else
  179 179         ad_returnredirect [export_vars -base "[subsite::get_element -element url]register/account-message" { { message $creation_info(account_message) } return_url }]