GetUserByStaffCode
≥4.8.5.200315.0
Interface Function
Obtain user information by staffCode.
Request Parameter
Parameter | Required | Type | Remarks |
---|---|---|---|
staffCode | true | string | User staffcode, e.g. ##180108043159170 or 180108043159170 |
organizationCode | false | string | organizationCode that user belongs to. Null is for using the current tenantId by default. |
Return Data Type
Return Sample
{
"StaffName": "DemoUser",
"StaffId": "9bbac58c-bac5-4633-844d-1e96faea0a10",
"StaffCode": "##180108043159170",
"TenantId": "ProductTeam",
"Email": "demo@digitalmaker.com",
"Phone": "8888",
"Roles": [],
"Groups": null,
"Menus": null,
"Avatar": "Base64 encoded avatar image",
"UserInfo": {
"Email": "demo@digitalmaker.com",
"FirstName": "Demo",
"LastName": "Demo",
"OrganizationCode": "ProductTeam",
"Phone": "8888",
"MobileNum": "",
"GUID": "bf0a153c-0b93-460e-88f0-9a546c1f99f0",
"UserName": "DemoUser",
"ActiveFlag": true,
"Salt": "z1u4hijKFuktRdtgJJFJt7740FOPCrLFgt0ULNrwMhSkonSU0",
"CreateDate": "/Date(1515400319660)/",
"UserID": "9bbac58c-bac5-4633-844d-1e96faea0a10",
"Devices": null,
"ActivationFlag": true,
"StaffCode": "##180108043159170",
"LastAction": "Register(C4Rush)",
"LastBatchNo": "",
"LastUpdate": "/Date(1515400319609)/",
"ActiveExpirationDate": null,
"Avatar": "Base64 encoded avatar image",
"CountryCode": null,
"OfficeCode": null,
"LoSCode": null,
"JobTitle": null
}
}
Code example
//
var staffCode="##200217042712778";
var organizationCode="DemoTenant";
var result=Service.GetUserByStaffCode(staffCode,organizationCode);
Service.ConsoleLog("GetUserByStaffCode result",result);