📃
Docs
  • 👋Welcome
  • 🌉Bridge
    • 💾Installation
    • 🌐Compatibility
    • 👨Client exports
      • ⏩Framework
        • getName
        • getJob
        • TriggerServerCallback
        • getSex
      • 🎒Inventory
        • getItemCount
      • 👁️Target
    • 🖥️Server exports
      • 🗃️Database
        • getUserData
        • getVehicleData
      • 🎒Inventory
        • openInventory
        • addItem
        • removeItem
        • canCarryItem
        • getItemCount
        • registerStash
        • setDurability
      • ⏩Framework
        • getPlayerFromId
        • getPlayerFromIdentifier
        • getIdentifier
        • RegisterServerCallback
        • getSource
        • getName
        • getJob
        • getAllPlayers
        • setJob
        • doesJobExist
        • getCoords
        • getJobs
  • 🔫Organization Panel
    • 📝Configuration
    • 💾Installation
    • 🗃️Framework integration
      • 💼ESX
        • 🚪ox_doorlock usage
      • 💼QBCore
        • 🚪ox_doorlock usage
      • 💼Other framework
    • 💻Server
      • Server exports
      • Server events
    • 👨Client
      • Client exports
  • ♣️Bossmenu
    • 📝Configuration
    • 💾Installation
    • 📖Framework integration
      • 🖼️ESX
      • 🖼️QBCore & QBOX
      • 🖼️Other Framework
    • 🖥️Server
      • 🔁Events
      • 🔃Exports
    • 👨Client
      • 🔁Events
      • 🔃Exports
  • 🕺Adjust Animation
    • 🗒️Configuration
    • 💾Installation
    • 📚Other scripts integration
      • 💃scully_emotemenu
      • 💃rpemotes
      • 💃other
  • 👮Police MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📖Framework integration
      • 🖼️ESX
      • 🖼️QBOX/QB-Core
      • 🖼️Other Framework
    • 🚨wk_wars_2x Integration
    • 📚Exports
      • 🔃Server
      • 👨Client
  • 👨‍💼DOJ MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📚Exports
      • 👨Client
  • 🩺EMS MDT
    • 🚀Install & Setup Guide
    • 📝Configuration
    • 📚Exports
      • 🔃Server
      • 👨Client
Powered by GitBook
On this page

Was this helpful?

  1. Bridge
  2. Server exports
  3. Database

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:

nil
PreviousDatabaseNextgetVehicleData

Last updated 1 year ago

Was this helpful?

🌉
🖥️
🗃️