---
updatedAt: 2025-07-15T08:53:45.000Z
agentTools:
  projectIndex: https://docs.appery.io/llms.txt
---

# DatabaseUser

Database user API.

**DatabaseUser** provides integration with the **[Users](https://docs.appery.io/docs/database-collections#users)** collection from the database (sign up, log in, log out, update, retrieve and delete users).

# Method summary

**DatabaseUser** has the following methods:

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Method
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        login(dbId, userName, password[, masterKey])
      </td>

      <td>
        Logs in to the database and gets a session token for next actions.
      </td>
    </tr>

    <tr>
      <td>
        logout(dbId, token)
      </td>

      <td>
        Logs out from the database and destroys current session token.
      </td>
    </tr>

    <tr>
      <td>
        signUp(dbId, userJSON)
      </td>

      <td>
        Signs up user to the database.
      </td>
    </tr>

    <tr>
      <td>
        update(dbId, objectId, userJSON[,token])
      </td>

      <td>
        Updates info about the user in the database.
      </td>
    </tr>

    <tr>
      <td>
        retrieve(dbId, objectId, include[,token])
      </td>

      <td>
        Retrieves info about the user in the database.
      </td>
    </tr>

    <tr>
      <td>
        remove(dbId, objectId[, token])
      </td>

      <td>
        Deletes the user from the database.
      </td>
    </tr>

    <tr>
      <td>
        query(dbId, params[, token])
      </td>

      <td>
        Queries users from the database.
      </td>
    </tr>
  </tbody>
</Table>