acs_user::demote_user (public)

 acs_user::demote_user [ -user_id user_id ] [ -delete_portrait ]

Defined in packages/acs-tcl/tcl/community-core-procs.tcl

Demotes an ACS user to a person/party. If another table references the user and prevents deletion, all database changes made by demotion are rolled back. It is probably best for tables created in other packages to reference persons, parties, or acs_objects instead. This proc could be extended with an option to find all referenced tables and remove rows referencing this user.

Switches:
-user_id (optional)
the user_id in the acs system that should be demoted.
-delete_portrait (optional, boolean)
Delete the portrait of the user
Error:
An error is thrown if user_id is not in the users table.

Partial Call Graph (max 5 caller/called nodes):
test_demote_promote_a_user demote_promote_a_user (test acs-tcl) acs_user::demote_user acs_user::demote_user test_demote_promote_a_user->acs_user::demote_user test_demote_user_rolls_back demote_user_rolls_back (test acs-tcl) test_demote_user_rolls_back->acs_user::demote_user acs_user::erase_portrait acs_user::erase_portrait (public) acs_user::demote_user->acs_user::erase_portrait acs_user::flush_cache acs_user::flush_cache (public) acs_user::demote_user->acs_user::flush_cache acs_user::get acs_user::get (public) acs_user::demote_user->acs_user::get db_dml db_dml (public) acs_user::demote_user->db_dml db_multirow db_multirow (public) acs_user::demote_user->db_multirow

Testcases:
demote_promote_a_user, demote_user_rolls_back
[ show source ]
Show another procedure: