Inheritance diagram for BaseTicket:
BaseTicket handles teh creation, validation, and deletion of 'tickets' which are basically specially generated links that allow a user to automatically be logged in once. These are for sending emails and such where it is handy for a user not to have to remember a password. They are designed to be secure, but may not be entirely secure. Use them at your own risk.
Definition at line 12 of file base-ticket.inc.php.
Public Member Functions | |
__construct ($hash=null, $table= 'tickets') | |
our constructor | |
getPagesXml () | |
our pages xml function... | |
getCreateTableSql () | |
this gets the sql statement(s) that create the tables needed for this module. | |
initGatePage () | |
initializes teh gate page. | |
drawMainPage () | |
another placeholder | |
verify () | |
verify that the ticket is legitimate. | |
generate ($url, $user, $expire=null) | |
generates a 16 letter hash based on sha1 of rand. | |
url () | |
gets teh url to use. | |
process () | |
process our hash. | |
destroy () | |
destroy our hash from the database. | |
Private Attributes | |
$hash | |
The hash of the ticket... | |
$url | |
The url to send the user to. | |
$user | |
A user object for our ticket. | |
$table | |
The table to use. |
|
our constructor
Definition at line 39 of file base-ticket.inc.php. |
|
destroy our hash from the database.
Definition at line 192 of file base-ticket.inc.php. References dbExecute(). Referenced by process(). |
|
another placeholder
Reimplemented from BaseModule. Definition at line 100 of file base-ticket.inc.php. |
|
generates a 16 letter hash based on sha1 of rand.
Definition at line 131 of file base-ticket.inc.php. References dbExecute(), and url(). |
|
this gets the sql statement(s) that create the tables needed for this module. these should be the tables the module directly accesses.
Reimplemented from BaseModule. Definition at line 63 of file base-ticket.inc.php. References url(). |
|
our pages xml function... adds a 'gate' page which processes tickets.
Reimplemented from BaseModule. Definition at line 52 of file base-ticket.inc.php. |
|
initializes teh gate page. processes teh ticket. redirects them if its legit, checks for a url and redirects to that (pages should be asserting login if they need users logged in.), otherwise it errors out if there is no url parameter Definition at line 84 of file base-ticket.inc.php. References BaseModule::params(), process(), Util::redirect(), and url(). |
|
process our hash. if we can verify it, then we create the user, destroy the hash, and redirect them.
Definition at line 169 of file base-ticket.inc.php. References $hash, $user, destroy(), Util::redirect(), url(), and verify(). Referenced by initGatePage(). |
|
gets teh url to use.
Definition at line 158 of file base-ticket.inc.php. References BaseModule::getUrl(). Referenced by generate(), getCreateTableSql(), initGatePage(), and process(). |
|
verify that the ticket is legitimate. (ie it exists in teh database.)
Definition at line 110 of file base-ticket.inc.php. References dbFetchAssoc(), dbGetNumRows(), and dbQuery(). Referenced by process(). |
|
The hash of the ticket... basically the ticket id. Definition at line 17 of file base-ticket.inc.php. Referenced by process(). |
|
The table to use.
Definition at line 32 of file base-ticket.inc.php. |
|
The url to send the user to.
Definition at line 22 of file base-ticket.inc.php. |
|
A user object for our ticket.
Definition at line 27 of file base-ticket.inc.php. Referenced by process(). |