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.