The database record of a player, stored in the users table: their SteamID, their name, their persistent data table (the data column, written by Player:set_player_data) and any columns that plugins add. Player:restore_player loads or creates the record when a player joins and stores it in the record field of the player; the record points back to the player through its player field, which is passed on to child records. Player:save_player saves it.

Summary

Methods

Called by ActiveRecord when a child record is attached to this user.

Methods

User:as_parent(child_obj, _child_class)

shared packages/flow/models/user.lua:14

Called by ActiveRecord when a child record is attached to this user. Copies the user's player reference to the child.

Parameters

  • child_obj ActiveRecord::Base the child record
  • _child_class Map class of the child record

Defined in