Forum .LRN Q&A: Error in add-user and registering

when i try to add a new user (in dotlrn2.02) i receive this:

Request Error

Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  ExecInsert: rejected due to CHECK constraint "membership_rel_mem_ck" on "membership_rels"

SQL:

            select acs__add_user(
                '23426',
                'user',
                now(),
                null,
                '200.175.180.100',
                '9',
                'mailto:med@abor.com.br';,
                'mailto:med@abor.com.br';,
                NULL,
                'a',
                'd',
                '96C01EB44374D3760452317EA09975EC13AFF333',
                'B80AA3C44E8B48D3BF1ABFFCBF39ABC541F6A84E',
                NULL,
                't',
                'aprovado'
            );


    while executing
"ns_pg_bind 0or1row nsdb0 {

            select acs__add_user(
                :user_id,
                'user',
                now(),
              ..."
    ("uplevel" body line 1)
    invoked from within
"uplevel $ulevel [list ns_pg_bind $type $db $sql"
    ("postgresql" arm line 2)
    invoked from within
"switch $driverkey {
                oracle {
                    return [uplevel $ulevel [list ns_ora $type $db $sql] $args]
                }
      ..."
    invoked from within
"db_exec 0or1row $db $full_statement_name $sql"
    invoked from within
"if {[regexp -nocase -- {^\s*select} $test_sql match]} {
                ns_log Debug "PLPGSQL: bypassed anon function"
                set selection [..."
    ("uplevel" body line 6)
    invoked from within
"uplevel 1 $code_block "
    invoked from within
"db_with_handle -dbn $dbn db {
            # plsql calls that are simple selects bypass the plpgsql
            # mechanism for creating anonymous fun..."
    (procedure "db_exec_plsql" line 57)
    invoked from within
"db_exec_plsql user_insert {}"
    invoked from within
"set user_id [db_exec_plsql user_insert {}]"
    ("uplevel" body line 3)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 1)
    invoked from within
"db_transaction {

        set user_id [db_exec_plsql user_insert {}]

        # set password_question, password_answer
        db_dml update_question_..."
    (procedure "ad_user_new" line 32)
    invoked from within
"ad_user_new  $user_info(email)  $user_info(first_names)  $user_info(last_name)  {}  $user_info(secret_question)  $user_info(secret_answer)  $user_info..."
    invoked from within
"set user_id [ad_user_new  $user_info(email)  $user_info(first_names)  $user_info(last_name)  {}  $user_info(secret_question)  $user_info(secret_answer..."
    ("uplevel" body line 4)
    invoked from within
"uplevel $body "
    (procedure "db_transaction" line 1)
    invoked from within
"db_transaction {
        array set creation_info [auth::create_local_account  -user_id $user_id  -authority_id $authority_id  -username $username  -ar..."
    (procedure "auth::create_user" line 29)
    invoked from within
"auth::create_user  -user_id $user_id  -verify_password_confirm  -username $username  -email $email  -first_names $first_names  -last_name $last_name  ..."
    invoked from within
"array set creation_info [auth::create_user  -user_id $user_id  -verify_password_confirm  -username $username  -email $email  -first_names $first_names..."
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $transaction_code "
    (procedure "db_transaction" line 39)
    invoked from within
"db_transaction {
        array set creation_info [auth::create_user  -user_id $user_id  -verify_password_confirm  -username $username  -email $email  ..."
    ("uplevel" body line 3)
    invoked from within
"uplevel #$level $on_submit"
    ("1" arm line 589)
    invoked from within
"switch $errno {
            0 {
                # TCL_OK
            }
            1 {
                # TCL_ERROR
                global errorInfo er..."
    (procedure "ad_form" line 609)
    invoked from within
"ad_form -extend -name register -on_request {
    # Populate elements from local variables

} -on_submit {

    db_transaction {
        array set crea..."
    ("uplevel" body line 65)
    invoked from within
"uplevel {
          # Expects parameters:
#
# self_register_p - Is the form for users who self register (1) or
#                  for administrators who..."
    (procedure "code::tcl::/web/service0/packages/acs-subsite/lib/user-new" line 2)
    invoked from within
"code::tcl::$__adp_stub"
    invoked from within
"if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init tcl $__adp_stub
..."
    ("uplevel" body line 3)
    invoked from within
"uplevel {

    if { [file exists $__adp_stub.tcl] } {

      # ensure that data source preparation procedure exists and is up-to-date
      adp_init t..."
    (procedure "adp_prepare" line 2)
    invoked from within
"adp_prepare "
    (procedure "template::adp_parse" line 30)
    invoked from within
"template::adp_parse [template::util::url_to_file "/packages/acs-subsite/lib/user-new" "$__adp_stub"] [list next_url "${next_url}" self_register_p "0" ..."
    invoked from within
"append __adp_output [template::adp_parse [template::util::url_to_file "/packages/acs-subsite/lib/user-new" "$__adp_stub"] [list next_url "${next_url}"..."
    ("uplevel" body line 8)
    invoked from within
"uplevel {
          set __adp_output ""

    set __adp_master [template::util::url_to_file "[ad_parameter -package_id [ad_conn subsite_id] DefaultMaster ..."
    (procedure "template::code::adp::/web/service0/packages/acs-admin/www/us..." line 2)
    invoked from within
"template::code::${template_extension}::$__adp_stub"
    (procedure "template::adp_parse" line 68)
    invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
    (procedure "adp_parse_ad_conn_file" line 7)
    invoked from within
"$handler"
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
                $handler
            } ad_script_abort val {
                # do nothing
            }"
    invoked from within
"rp_serve_concrete_file [ad_conn file]"
    (procedure "rp_serve_abstract_file" line 60)
    invoked from within
"rp_serve_abstract_file "$root/$path""
    ("uplevel" body line 2)
    invoked from within
"uplevel $code"
    invoked from within
"ad_try {
    rp_serve_abstract_file "$root/$path"
    set tcl_url2file([ad_conn url]) [ad_conn file]
    set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..."

the registration fails too...with the same request error.

Any clues for this?