xo::ConnectionContext instproc eval_as_user (public)
<instance of xo::ConnectionContext> eval_as_user \ [ -user_id user_id ] cmd
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/context-procs.tcl
Run a command as the specified different user. Essentially, this method updates xo::cc and the ad_conn array array with the specified user, runs the command and resets the user to the previous value.
- Switches:
- -user_id (optional, integer)
- switch temporarily to this user
- Parameters:
- cmd (required)
- command to be exevuted
- Testcases:
- create_test_items