Options
All
  • Public
  • Public/Protected
  • All
Menu

Module orm_functions/password_reset

Index

Functions

  • createOrUpdateReset(loginUserId: number, resetId: string, validUntil: Date): Promise<password_reset>
  • creates a new entry for password reset if none exists yet. overwrites the info of the old reset entry if a reset entry already exists

    Parameters

    • loginUserId: number

      the id of the loginUser whose passport we want to reset

    • resetId: string

      the unique id to reset the passport of the login user

    • validUntil: Date

      timestamp that shows until when the resetId is valid

    Returns Promise<password_reset>

    the created/updated entry from the database in a promise

  • deleteResetWithLoginUser(loginUserId: number): Promise<password_reset>
  • Parameters

    • loginUserId: number

      the id of the loginUser whose reset entry we want to delete

    Returns Promise<password_reset>

    the deleted entry (or null if there was no entry) inside a promise

  • deleteResetWithResetId(resetId: string): Promise<password_reset>
  • Parameters

    • resetId: string

      the resetId of the entry we want to delete

    Returns Promise<password_reset>

    the deleted entry (or null if there was no entry) inside a promise

  • findResetByCode(resetCode: string): Promise<null | password_reset>

Generated using TypeDoc