Index: openacs-4/packages/acs-tcl/tcl/community-core-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/community-core-procs-oracle.xql 9 Aug 2002 20:02:27 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs-oracle.xql 22 Aug 2003 15:06:30 -0000 1.3 @@ -7,19 +7,21 @@ begin - :1 := acs.add_user(user_id => :user_id, - email => :email, - url => :url, - first_names => :first_names, - last_name => :last_name, - password => :hashed_password, - salt => :salt, - password_question => :password_question, - password_answer => :password_answer, - creation_ip => :peeraddr, - email_verified_p => :email_verified_p, - member_state => :member_state); - end; + :1 := acs.add_user( + user_id => :user_id, + email => :email, + url => :url, + first_names => :first_names, + last_name => :last_name, + password => :hashed_password, + salt => :salt, + password_question => :password_question, + password_answer => :password_answer, + creation_ip => :peeraddr, + email_verified_p => :email_verified_p, + member_state => :member_state + ); + end; Index: openacs-4/packages/acs-tcl/tcl/community-core-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-tcl/tcl/community-core-procs-postgresql.xql 9 Aug 2002 20:02:27 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs-postgresql.xql 22 Aug 2003 15:06:30 -0000 1.8 @@ -6,32 +6,33 @@ - select acs__add_user( - :user_id, - 'user', - now(), - null, - :peeraddr, - :email, - :url, - :first_names, - :last_name, - :hashed_password, - :salt, - :password_question, - :password_answer, - null, - :email_verified_p, - :member_state); - + select acs__add_user( + :user_id, + 'user', + now(), + null, + :peeraddr, + null, -- authority + :username, + :email, + :url, + :first_names, + :last_name, + :hashed_password, + :salt, + null, + :email_verified_p, + :member_state + ); + - select person__delete(:person_id); - + select person__delete(:person_id); + Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 22 Aug 2003 11:53:11 -0000 1.15 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 22 Aug 2003 15:06:30 -0000 1.16 @@ -95,40 +95,26 @@ set url [db_null] } + # Lars: This is a hack until we sort out the UsernameIsEmail situation + if { [empty_string_p $username] } { + set username $email + } + set peeraddr [ad_conn peeraddr] set salt [sec_random_token] set hashed_password [ns_sha1 "$password$salt"] db_transaction { - set user_id [db_exec_plsql user_insert { - begin - :1 := acs.add_user(user_id => :user_id, - email => :email, - url => :url, - first_names => :first_names, - last_name => :last_name, - password => :hashed_password, - salt => :salt, - password_question => :password_question, - password_answer => :password_answer, - creation_ip => :peeraddr, - email_verified_p => :email_verified_p, - member_state => :member_state); - end; - } - ] - - if { [empty_string_p $username] } { - set username $email - } + set user_id [db_exec_plsql user_insert {}] - # Add username, authority_id - db_dml update_users { + # set password_question, password_answer + db_dml update_question_answer { update users - set username = :username, - authority_id = :authority_id + set password_question = :password_question, + password_answer = :password_answer where user_id = :user_id + } if {[catch {