getUserData
Bridge.getUserData(args, additionalColumns, callback)Arguments
args (table): Conditions for searching the user. The key "identifier" corresponds to "citizenid".
additionalColumns (table, optional): Additional columns to return. Can include aliases in the format
"column as alias".callback (function): Callback function that will receive the user data.
Returns
userData (table): User data, including
citizenid,identifier,firstname,lastname,dob(date of birth),sex(gender), and other columns if specified.
Example Usage
Bridge.getUserData({ identifier = "citizenid123" }, { 'job', 'inventory as inv' }, function(userData)
if userData then
print("User Identifier: " .. userData.identifier)
print("User Name: " .. userData.firstname .. " " .. userData.lastname)
print("User Job: " .. userData.job)
print("User Inventory: " .. userData.inv)
else
print("User not found")
end
end)Return Structure
If user is found:
{
identifier = "citizenid123",
firstname = "John",
lastname = "Doe",
dob = "1990-01-01",
sex = "male",
job = "police",
inv = "inventory data"
}If user is not found:
nilLast updated
Was this helpful?