mv_user_contributions db user_id purposeWhat it does:
Returns empty list unless it is the site admin asking. Returns list items, one for each user chargeDefined in: /web/philip/tcl/ad-member-value.tcl
Source code:
if { $purpose != "site_admin" } { return [list] } set items "" set selection [ns_db select $db "select uc.entry_date, uc.charge_type, uc.currency, uc.amount, uc.charge_comment, uc.admin_id, u.first_names || ' ' || u.last_name as admin_name from users_charges uc, users u where uc.user_id = $user_id and uc.admin_id = u.user_id order by uc.entry_date desc"] while { [ns_db getrow $db $selection] } { set_variables_after_query append items "<li>$entry_date: $charge_type $currency $amount, by <a href=\"/admin/member-value/charges-by-one-admin?admin_id=$admin_id\">$admin_name</a>" if ![empty_string_p $charge_comment] { append items " ($charge_comment)" } append items "\n" } if [empty_string_p $items] { return [list] } else { return [list 0 "Member Value" "<ul>\n\n$items\n\n</ul>"] }