ad_users_new_stuff

one of the documented procedures in this installation of the ACS
Usage:
ad_users_new_stuff   db   since_when   only_from_new_users_p   purpose
What it does:
Produces a report for the site administrator; nothing for random surfers and email summary recipients
Defined in: /web/philip/tcl/ad-new-stuff.tcl

Source code:


    if { $purpose != "site_admin" } {
	return ""
    }
    set n_new [database_to_tcl_string $db "select count(*) from users where registration_date > '$since_when'"]
    if { $n_new == 0 } {
	return ""
    } elseif { $n_new < 10 } {
	# let's display the new users in-line
	set result_items ""
	set selection [ns_db select $db "select user_id, first_names, last_name, email from users where registration_date > '$since_when'"]
	while { [ns_db getrow $db $selection] } {
	    set_variables_after_query
	    append result_items "<li><a href=\"/admin/users/one?[export_url_vars user_id]\">$first_names $last_name</a> ($email)\n"
	}
	return "<ul>\n\n$result_items\n</ul>\n"
    } else {
	# lots of new users
	return "<ul>\n<li><a href=\"/admin/users/action-choose?registration_after_date=[ns_urlencode $since_when]\">$n_new new users</a>\n</ul>\n"
    }


philg@mit.edu