make-member.tcl

Make ordinary members.

Location:
/packages/acs-subsite/www/members/make-member.tcl

Related Files

[ hide source ] | [ make this the default ]

File Contents

ad_page_contract {
    Make ordinary members.
} {
    {user_id:naturalnum,multiple ""}
}

set group_id [application_group::group_id_from_package_id]

permission::require_permission -object_id $group_id -privilege "admin"

# TODO:
# Check if you're making yourself a non-admin?

db_transaction {
    foreach one_user_id $user_id {
        db_1row get_rel_id {}
        relation_remove $rel_id
    }
} on_error {
    ad_return_error "Error creating the relation" "We got the following error message while trying to create this relation: <pre>$errmsg</pre>"
    ad_script_abort
}

ad_returnredirect .
ad_script_abort

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: