Base
[ class tree: Base ] [ index: Base ] [ all elements ]

Class: User

Source Location: /objects/user.php

Class Overview


Holds information on a user for display, or to manage certain user related functions such as logging on, and preventing the same data being sent twice. Also processes user registration forms.


Variables

Methods



Class Details

[line 31]
Holds information on a user for display, or to manage certain user related functions such as logging on, and preventing the same data being sent twice. Also processes user registration forms.

TODO: I think much of this isn't used, or used rarely enough that it would be better placed elsewhere




[ Top ]


Class Variables

$comment =

[line 78]

The user-profile comment


Type:   string


[ Top ]

$email =

[line 54]

E-mail address


Type:   string


[ Top ]

$formTicket =

[line 72]

Form-ticket to prevent users from submitting the same form twice


Type:   int


[ Top ]

$gmtOffset =

[line 104]

GMT offset, in seconds


Type:   int


[ Top ]

$hideEmail =

[line 91]

Hide-email? 'Yes'/'No'


Type:   string


[ Top ]

$homepage =

[line 84]

User-profile homepage


Type:   string


[ Top ]

$id =

[line 36]

User ID


Type:   int


[ Top ]

$lastMessageIDViewed =

[line 128]

The last message this user viewed in the public forum


Type:   int


[ Top ]

$locale =

[line 110]

Locale


Type:   string


[ Top ]

$online =

[line 134]

Is this user online?


Type:   bool


[ Top ]

$password =

[line 48]

MD5 (salted) password hex encoded


Type:   string


[ Top ]

$points =

[line 140]

Number of available points


Type:   int


[ Top ]

$sessionCode =

[line 66]

Temporary session code (this may now be obsolete)


Type:   int


[ Top ]

$statusimg =

[line 122]

The status green icon, will be present here if this user is online


Type:   string


[ Top ]

$timeJoined =

[line 98]

UNIX timestamp of join-date


Type:   int


[ Top ]

$timeLastSessionEnded =

[line 116]

UNIX timestamp from the time the last session ended


Type:   int


[ Top ]

$type =

[line 60]

User type; an array of user-types, each set to true for is-a-member, false for is-not-a-member


Type:   array


[ Top ]

$username =

[line 42]

Username


Type:   string


[ Top ]



Class Methods


static method processForm [line 149]

static array processForm( array $input)

Filter a registration/user control panel form. An exception is thrown if data can't be filtered. An array of variables usable in SQL are returned.



Tags:

return:  An array of filtered SQL insertable data
access:  public


Parameters:

array   $input   An array of unfiltered data from a registration/control panel form

[ Top ]

constructor __construct [line 263]

User __construct( int $id, [string|bool[optional] $username = false])

Initialize a user object



Parameters:

int   $id   User ID
string|bool[optional]   $username   Look the user up based on username instead of user ID

[ Top ]

method formTicket [line 284]

bool formTicket( )

Checks for a formTicket get/post integer, and checks that it matches the last formTicket given out. If so the form being submitted is valid, otherwise it's invalid.

If valid the formTicket is incremented, so it becomes invalid




Tags:

return:  True if the form ticket is valid, false otherwise


[ Top ]

method load [line 313]

void load( [string|bool[optional] $username = false])

Load the User object class fields. It is assumed that username is already escaped.



Parameters:

string|bool[optional]   $username   If the username is given it is being used instead of ID to load the User

[ Top ]

method logon [line 412]

void logon( )

Log-on, create/update a session record, and take information for user access logging for meta-gamers



[ Top ]

method profile_link [line 375]

string profile_link( [bool[optional] $welcome = false])

Return a profile link for this user



Tags:

return:  Profile link HTML


Parameters:

bool[optional]   $welcome   If true this profile link is tweaked to be used as the Welcome link

[ Top ]

method timeJoinedtxt [line 404]

string timeJoinedtxt( )

The time this user joined



Tags:

return:  Date joined


[ Top ]


Documentation generated on Thu, 13 Nov 2008 18:16:44 +0900 by phpDocumentor 1.4.1