Forum OpenACS Q&A: Re: Response to Group Membership in OpenACS4

Collapse
Posted by Rod Cap on
Hi, I try this option but I don't realy know what to put in creation_user an creation_ip; I set it to null. But it doesn't relation the user into de group. Here is my source I modify from user-batch-add-2.tcl.  I apreciate responsing.
Thaks!
This is inside a while and group_id is a parameter.
I had to wrote sql "" because it throws an error.

set user_id [ad_user_new $email $first_names $last_name $password "" "" "" "t" "approved"]

    append success_text "Created user $user_id for ($row)<br\>"

    # Aqui se hace la relacion con el grupo
    db_exec_plsql sql "
        select membership_rel_new (null, 'membership_rel', :group_id, :user_id, 'approved',null,null)"