mGetUseMyChat Scripts Engine: mGetUserDataAsJSONrDataAsJSON, get any user's data by UIN
Function to obtain the list of any user's fields in JSON format by his UIN.
Syntax
function mGetUserDataAsJSON(iUIN: integer; sParams: string): string;
Parameters and return values
|
Parameter |
Type |
Value |
|
iUIN |
integer |
unique user identifier, information about which you need to obtain; |
|
sParams |
string |
list of fields, separated by commas. The letter case is not important. if you specify the word "all" then all available fields will be selected. |
List of user available fields
|
Name |
Type |
Description |
|
Avatar |
integer |
CRC32 of the user's photo; |
|
Tag |
string |
text tag, special field, can be edited and read via MSL; |
|
DomainName |
string |
user's domain name; |
|
Nick |
string |
user's nickname. If it is a domain user then it is his domain name; |
|
DisplayName |
string |
user's display name. The style is configured on the server; |
|
Active |
boolean |
active or blocked user's account; |
|
FirstName |
string |
user's real name; |
|
MiddleName |
string |
user's middle name; |
|
LastName |
string |
user's last name; |
|
Registered |
double |
date and time of the account creation; |
|
Role |
integer |
user's role (the number of the rights group); |
|
RoleName |
string |
name of the user's rights group; |
|
MaritalStatus |
integer |
marital status: -1 — unspecified; 0 — in a relationship; 1 — widowed; 2 — married; 3 — engaged; 4 — divorced; 5 — separated; 6 — unmarried; |
|
HomePhone |
string |
home phone number; |
|
HomeFax |
string |
home fax; |
|
Birthday |
double |
date of birth; |
|
BirthdayISO |
string |
birth day in the format ISO 8601 (yyy-mm-dd) |
|
|
string |
main email address; |
|
HomeCellular |
string |
personal mobile phone; |
|
HomeStreetAddress |
string |
home address; |
|
HomeCity |
string |
home city; |
|
HomeState |
string |
state/province/region/district; |
|
HomeZIP |
string |
home ZIP code; |
|
HomeCountry |
integer |
home country; |
|
HomeWWW |
string |
personal WEB page; |
|
WorkDept |
string |
work department; |
|
WorkDeptIdx |
integer |
internal index of the work department (number); |
|
WorkPosition |
string |
work position; |
|
WorkPositionIdx |
integer |
internal index of the work position (number); |
|
WorkCompanyName |
string |
company name; |
|
WorkOffice |
string |
work office; |
|
WorkPhone |
string |
work phone number; |
|
WorkFax |
string |
work fax; |
|
WorkPager |
string |
work pager or messenger number; |
|
WorkStreetAddress |
string |
work address; |
|
WorkCity |
string |
work city; |
|
WorkState |
string |
work state/province/region/district; |
|
WorkZIP |
string |
work ZIP code; |
|
WorkCountry |
integer |
work country; |
|
WorkWWW |
string |
work WEB page; |
|
SpokenLang1 |
integer |
language spoken, number 1; |
|
SpokenLang2 |
integer |
language spoken, number 2; |
|
SpokenLang3 |
integer |
language spoken, number3; |
|
Interests1 |
integer |
interests section, number 1; |
|
InterestsWords1 |
string |
interests section, key words, number 1; |
|
Interests2 |
integer |
interests section, number 2; |
|
InterestsWords2 |
string |
interests section, key words, number 2; |
|
Interests3 |
integer |
interests section, number 3; |
|
InterestsWords3 |
string |
interests section, key words, number 3; |
|
Interests4 |
integer |
interests section, number 4; |
|
InterestsWords4 |
string |
interests section, key words, number 4; |
|
Past1 |
integer |
type of former employment or study, number 1; |
|
PastWords1 |
string |
type of former employment or study, key words number 1; |
|
Past2 |
integer |
type of former employment or study, number 2; |
|
PastWords2 |
string |
type of former employment or study, key words number 2; |
|
Past3 |
integer |
type of former employment or study, number 3; |
|
PastWords3 |
string |
type of former employment or study, key words number 3; |
|
PastOrg1 |
integer |
organization type, former employment, number 1; |
|
PastOrgWords1 |
string |
organization type, former employment, key words number 1; |
|
PastOrg2 |
integer |
organization type, former employment, number 2; |
|
PastOrgWords2 |
string |
organization type, former employment, key words number 2; |
|
PastOrg3 |
integer |
organization type, former employment, number 3; |
|
PastOrgWords3 |
string |
organization type, former employment, key words number 3; |
|
Sex |
integer |
user's gender: 0 unspecified, 1 male, 2 female; |
|
AuthType |
integer |
type of client authentication: 0 default, 1 Active Directory, 2 without a password, 3 Transparent AD; |
|
FotoCRC32 |
integer |
user's CRC32 photos; |
|
LastAccess |
double |
date and time of the last access to the server; |
|
LastSpeakTime |
double |
date and time of the last sent message; |
|
State |
integer |
current user's network status; |
|
FavoriteChannelsExists |
boolean |
check user's list of favorite text conferences; |
|
UnreadedBroadcastsExists |
boolean |
availability of unread notifications; |
|
OfflineMessagesExists |
boolean |
availability of the offline messages that were not received; |
|
HelloMessage |
string |
greeting message, if available. Displays to all users, who opened the private chat with this person; |
|
AutoreplayMessage |
string |
auto-reply message; |
|
Autoreplay |
boolean |
enabled or disabled answerphone; |
|
Reputation |
integer |
user's reputation, number; |
|
About |
string |
information field "About user"; |
Function result
Text string, JSON object.
Example
var
sJSON: string;
begin
sJSON := mGetUserDataAsJSON(6, 'Nick');
mLogScript(sJSON, 'result');
end.
Script work result
[21:25:43] (Log "mGetUserDataAsJSON"): [result] {"UIN":6,"What":"Nick","Nick":"(Hobit)"}