Table Users - warwickfoster/qurantools GitHub Wiki

The users table stores user account details, including login credentials, preferences, and activity data. It is a core component of user management, supporting authentication and personalization features.

Analysis of the users Table

Below is the detailed analysis and description of each field in the users table, with the table name included as a left-hand column.


Table Name Field Name Description
users User ID A unique identifier for each user, serving as the primary key for indexing and referencing user records.
users User Type Specifies the type of user (e.g., CONSUMER, ADMIN), defining their access level and role within the application.
users Email Address The email address associated with the user, used for communication and as a unique identifier for login and account recovery.
users Password Hash The hashed version of the user’s password for secure storage and authentication.
users First Name The user’s first name, used for personalization and communication.
users Last Name The user’s last name, used for personalization and communication.
users Administrator Indicates whether the user has administrative privileges (e.g., SUPERUSER, NULL if not an admin).
users Reset Code A code used for resetting the user’s password, generated during a password recovery request.
users Reset Timecode The timestamp when the password reset code was generated, used to verify the reset request’s validity.
users Last Login Date The date of the user’s most recent login, providing insights into user activity.
users Last Login Time The time of the user’s most recent login, complementing Last Login Date for precise activity tracking.
users Last Login Timestamp A combined timestamp of the user’s last login event, consolidating date and time for easier chronological analysis.
users Is Blocked Indicates whether the user’s account is blocked (NULL if not blocked).
users Login Count The total number of successful logins performed by the user, useful for engagement metrics.
users Fails Count The number of consecutive failed login attempts by the user, used for security measures such as account locking.
users Fail Time The timestamp of the user’s most recent failed login attempt.
users Creation Date The date when the user’s account was created, useful for lifecycle tracking and retention analysis.
users Preferred Highlight Colour The user’s preferred color for highlighting verses or text in the application, stored as a hexadecimal color code (e.g., FFFF00).
users Preferred Highlight Colour Lightness Value The lightness value of the preferred highlight color, used for rendering light or dark variations.
users Preferred Cursor Colour The user’s preferred cursor color, stored as a hexadecimal color code (e.g., DDDDDD).
users Preferred Translation The ID of the user’s preferred Quranic translation, linking to a translation table.
users Preferred Verse Count The number of verses the user prefers to view per page, used for pagination settings.
users Preferred Default Mode The user’s default mode of operation, such as 0 for basic mode or 1 for advanced features.
users Preferred Keyboard Direction The user’s preferred keyboard direction, such as LTR (left-to-right) or RTL (right-to-left).
users Preference Italics Transliteration Indicates whether the user prefers transliteration in italics (1 for enabled, 0 for disabled).
users Preference Show Quick Tips Indicates whether the user prefers to see quick tips (1 for enabled, 0 for disabled).
users Preference Floating Page Navigator Indicates whether the user prefers a floating page navigator (1 for enabled, 0 for disabled).
users Current Quick Tip ID The ID of the last quick tip viewed by the user, linking to a quick tips table for context.
users AJAX Token A token used for secure AJAX requests, preventing cross-site scripting (XSS) attacks.
users Preference Formulaic Glosses Indicates whether the user prefers to see formulaic glosses (1 for enabled, 0 for disabled).
users Preference Hide Transliteration Indicates whether the user prefers to hide transliteration (1 for enabled, 0 for disabled).
users LOCKED WITH MESSAGE Indicates if the user’s account is locked and provides a message or reason for the lock (NULL if not locked).
users User Name The user’s display name, used for personalized interactions within the application.

Key Insights

  1. Field Relationships:

    • User ID links the user’s account to other data, such as login logs, preferences, and usage analytics.
    • Preferred Translation connects to the translation-list table, personalizing the user’s experience.
  2. User Preferences:

    • Preferences such as highlight colors, verse count, and transliteration display allow for tailored user experiences.
  3. Security Features:

    • Fields like Password Hash, Reset Code, Reset Timecode, and AJAX Token ensure secure user authentication and session management.
  4. Applications:

    • Facilitates user account management, engagement tracking, and security monitoring.
    • Personalizes user interactions through configurable preferences.

Example Interpretation of Data:

  • Row 1:
    • User ID: 1525
    • User Type: CONSUMER
    • Email Address: [email protected]
    • Last Login Timestamp: 2025-01-01 07:41:33
    • Preferred Highlight Colour: FFFF00
    • Represents a consumer user with custom preferences for highlights and display. The user has logged in once, with no failed attempts.

Contextual Significance:

  1. Personalized Experience:
    • User preferences enhance engagement by allowing customizable views and features.
  2. Security and Monitoring:
    • Tracks login attempts and account status (Is Blocked, Fails Count) to ensure account integrity.
  3. Lifecycle Analysis:
    • Tracks user creation and activity to monitor retention and behavior patterns.