Send WaitCall attrCurrent user id

From SDU
Jump to: navigation, search
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

This method gets uuid of currently logged in user.

This action can be called in spell code in method send_wait for call_attr.

Usage

<source lang="javascript"> void send_wait (int timeout, object top_object, "call_attr", string factory_name, "current_user_id") </source>

  • timeout - how long (?in seconds?) should the method wait for finishing the method (0 means infinite)
  • top_object - root object for the method (on which the method is called)
  • attr_name - name of attribute on which the action is called
  • factory_name - name of factory on which the action is called (could be "cr" for requsts and incidents, "chg" for changes, "iss" for issues)

Results

On success user's user id is stored in the first position of global array msg. <source lang="javascript"> userid = msg[0]; </source>

Examples

<source lang="javascript"> // Get currently logged in user uuid login_userid; send_wait(0, top_object(), "call_attr", "cr", "current_user_id"); login_userid = msg[0]; </source>