session_set_team ()

session_set_team ()

Function prototype

session_set_team (session, team)

API VersionALL
Suported interfacesSOAP, REST (from API Version 2.7.32)

Sets the active TEAM for the SESSION USERThe function also verifies that the active ROLE is compatible with the team, and if not, the active ROLE is changed to:

  1. CASE MANAGER if the SESSION USER has that ROLE in the specified team
  2. Otherwise, the first ROLE found for the SESSION USER in the specified team.

Version


Input

parameters:

  • session: is the session id obtained in the session_init call
  • team: active team id

Output

parameters:

  • result: empty, when function executed with no error
  • ErrorMsg: any fault in the call, either in the validation of input parameters or If the provided credentials are not valid (this field will return a message of the number of attempts left until blocking the account), errors in the connection to the database or any other error, this parameter returns the error message produced
  • ErrorCode

Request

sample:

session_set_active_team ( “LCAAAAAAAAAAAAAAAAAAAAAAAA”, 1234);

Response

sample:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<result></result>
<ErrorMsg xsi:type="xsd:string">You have 2 attempts left</ErrorMsg>
<ErrorCode>USER_ACCESS_DENIED</ErrorCode>



Notes:

This call will replaces legacy function  † session_set_active_team ( session, team )