User account structure.
User account structure.This is the permanent user account record. It holds a user's particulars, along with additional preferences, access levels, statistics and state information. This is a pretty long structure. Here's a length description of the fields. I've grouped similar fields together to make the description a bit more readable:
- userid, passwd, username, company, address1, address2, phone, age
- The user's age in years. The user's particulars. Things that we need to know for billing, et cetera: the user's user ID (their handle within the system), their password, full name, company name (if any), address (two lines), contact phone number, age (in years) and sex (`yes, please' isn't an option --- see the USX_x constants).
- prefs, flags
- A set of preferences and flags respectively, comprising of UPF_x flags and UFL_x flags respectively (the flags are ORred together).
- sysaxs
- An array of flags, each of which corresponds to one operator command or privilege. Have a look at the USY_x flags for a full description.
- system
- The user's system, for statistics.
- language
- The user's preferred language number.
- scnwidth, scnheight
- User's preferred screen resolution (columns, rows respectively).
- datecre, datelast
- The date (and time, under the new API) of the account's creation and last login.
- passexp
- Counts the days until the user's password expires. Set to zero to denote that the user's password will not expire.
- tempclss, curclss
- The user's temporary class and permanent class. User classes are a way of managing user accounts with subscriptions, freebies, et cetera. The temporary class is where a user is placed when they run out of credits. The user stays in this class for the remainder of the day, until the daily cleanup either moves them to a new class or back to their original one.
- timetdy
- User's total connection time for today (i.e. after the last cleanup).
- classdays
- Number of days since the user was moved to their current permanent class.
- credits
- Credits left.
- totcreds, totpaid
- Respectively, the total number of credits debited to this account, ever, and the total number of paid credits debited to this account. The number of free credits debited to the account is equal to totcreds-totpaid.
- keys
- The user's personal keyring.
- timever, credsever
- The total time the user has spent online, and the total number of credits spent ever.
- pagetime, pagestate
- The time (in minutes) that must pass between pages to this user. This is done so as not to annoy the user. Not many people use it, at least on our systems. The page state restricts paging to the user in a small range of ways, listed as the PGS_x constants.
- filesdnl, bytesdnl filesupl, bytesupl, msgswritten, connections
- Respectively the number of files downloaded by the user, the grand total of bytes downloaded, files and bytes uploaded, total number of messages written and total number of connections made ever. These are used for statistical purposes.
- lastclub
- The last club accessed by the user. This is remembered in between sessions.
- auditfiltering
- Flags used to decide which audit trail entries (if any) are to be paged to the user. Uses the AUX_x flags, the same ones used by the audit trail functions to flag different severities and types of entries.