Index: openacs.org-dev/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs.org-dev/packages/acs-tcl/tcl/community-core-procs.tcl 14 Jul 2002 00:50:49 -0000 1.2 +++ openacs.org-dev/packages/acs-tcl/tcl/community-core-procs.tcl 17 Jul 2002 13:36:53 -0000 1.3 @@ -61,7 +61,7 @@ return [util_memoize [list cc_lookup_name_group $name]] } -ad_proc ad_user_new {email first_names last_name password password_question password_answer {url ""} {email_verified_p "t"} {member_state "approved"} {user_id ""} {registration_date ""} } { +ad_proc ad_user_new {email first_names last_name password password_question password_answer {url ""} {email_verified_p "t"} {member_state "approved"} {user_id ""} {registration_date ""} {peeraddr ""} } { Creates a new user in the system. The user_id can be specified as an argument to enable double click protection. If this procedure succeeds, returns the new user_id. Otherwise, returns 0. @@ -86,7 +86,10 @@ set registration_date [db_sysdate] } - set peeraddr [ad_conn peeraddr] + if { [empty_string_p peeraddr] } { + set peeraddr [ad_conn peeraddr] + } + set salt [sec_random_token] set hashed_password [ns_sha1 "$password$salt"]