userTable

userTable is an extended version of the table object. It contains all the same functionality as table but adds a few more functions to specifically deal with a “user” table in the database.

Parent Class

table


Public Methods

Obviously, all of the table methods are available as well. They are documented in the table documentation. In addition to those methods, the following have been added in this class.

boolean loadByEmail( string $email )
Locates the specified record from the database and loads its contents into the table object
Parameters:
$email (string: required) is the email address to locate the record by. It is assumed your database indeed has a field called ’email’
Returns:
True if the record is located, otherwise false.
Example:
boolean isDupeEmail( string $email )
Checks to see if the email address provided is already used in the user table
Parameters:
$email (string: required) is the email address to locate the record by. It is assumed your database indeed has a field called ’email’
Returns:
True if the email address is already in use, otherwise false.
Example:
boolean loadByUsername( string $username )
Locates the specified record from the database and loads its contents into the table object
Parameters:
$username (string: required) is the username to locate the record by. It is assumed your database indeed has a field called ‘username’
Returns:
True if the record is located, otherwise false.
Example:
boolean isDupeUsername( string $username )
Checks to see if the username provided is already used in the user table
Parameters:
$username (string: required) is the username to locate the record by. It is assumed your database indeed has a field called ‘username’
Returns:
True if the username is already in use, otherwise false.
Example: