"For developers", "Server scripts", "Functions description", "Users", "mGetUserPrimaryEmail".
Function to obtain the main email address of a user by his UIN.
function mGetUserPrimaryEmail(iUIN: integer): string;
Parameter |
Type |
Value |
---|---|---|
iUIN |
integer |
unique user identifier, from which you need to obtain the email. |
User's email address. If there is no user with such ID on the server or the email field is empty, the function returns an empty string. If you request UIN = 0, the function will get the email address of MyChat Server administrator, that can be specified in the server's settings.
var
sElisaEmail: string;
begin
sElisaEmail := mGetUserPrimaryEmail(0);
mLogScript('Server administrator''s email is: ' + sElisaEmail, '');
end.
[17:35:46] (Log "mGetUserPrimaryEmail"): Server administrator's email is: hobit@nsoft-s.com
[17:35:46] (Run "mGetUserPrimaryEmail"): Script operation time: 2 ms
[17:35:46] (Run "mGetUserPrimaryEmail"): Script done successfully.