ad_registration_finite_state_machine_admin_links (public)
ad_registration_finite_state_machine_admin_links [ -nohtml ] \ member_state email_verified_p user_id [ return_url ]
Defined in packages/acs-tcl/tcl/admin-procs.tcl
Returns the administration links to change the user's state in the user_state finite state machine. If the nohtml switch is set, then a list of lists will be returned (url label).
- Switches:
- -nohtml (optional, boolean)
- Parameters:
- member_state (required)
- email_verified_p (required)
- user_id (required)
- return_url (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set user_finite_states [list] switch -- $member_state { "approved" { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state banned} }] [_ acs-tcl.ban]] [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state deleted} }] [_ acs-tcl.delete]] } "deleted" { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state approved} }] [_ acs-tcl.undelete]] [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state banned} }] [_ acs-tcl.ban]] } "needs approval" { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state approved} }] [_ acs-tcl.approve]] [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state rejected} }] [_ acs-tcl.reject]] } "rejected" { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state approved} }] [_ acs-tcl.approve]] } "banned" { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url {member_state approved} }] [_ acs-tcl.approve]] } } if { $email_verified_p == "t" } { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url member_state {email_verified_p f} }] [_ acs-tcl.lt_require_email_verific]] } else { lappend user_finite_states [list [export_vars -base "/acs-admin/users/member-state-change" { user_id return_url member_state {email_verified_p t} }] [_ acs-tcl.approve_email]] } if { $nohtml_p } { # Return the list of lists (url label) return $user_finite_states } else { # Build a list of anchor tags set user_finite_state_links {} foreach elm $user_finite_states { lassign $elm url label lappend user_finite_state_links [subst {<a href="[ns_quotehtml $url]">$label</a>}] } return $user_finite_state_links }XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/acs-tcl/tcl/admin-procs.xql