In order to find out who the manager of the document initiator is, who is using the activity PHP code (i.e., without using the userís choice activity), you can use the code provided below.
In this code, the variable $num shows the managerís level (1 Ė direct supervisor, 2 Ė managerís manager,..). Managerís ID in a BP format (i.e. of the user_X type) is recorded into a variable with the name var5. This variable must be created in BP parameters and must have a linked-to-user type.