Inherited Variables
Inherited Constants
Inherited Methods
Class Details
Flexible Access - The main class
[ Top ]
Class Variables
$dbConn
[line 109]
Type: mixed
Overrides:
[ Top ]
$dbHost = 'localhost'
[line 45]
The database host
var string
Type: mixed
Overrides:
[ Top ]
$dbName = 'database'
[line 40]
The database that we will use
var string
Type: mixed
Overrides:
[ Top ]
$dbPass = 'password'
[line 60]
The database password
var string
Type: mixed
Overrides:
[ Top ]
$dbPort = 3306
[line 50]
The database port
var int
Type: mixed
Overrides:
[ Top ]
$dbTable = 'users'
[line 65]
The database table that holds all the information
var string
Type: mixed
Overrides:
[ Top ]
$dbUser = 'user'
[line 55]
The database user
var string
Type: mixed
Overrides:
[ Top ]
$displayErrors = true
[line 106]
Display errors? Set this to true if you are going to seek for help, or have troubles with the script
var bool
Type: mixed
Overrides:
[ Top ]
$passMethod = 'sha1'
[line 101]
The method used to encrypt the password. It can be sha1, md5 or nothing (no encryption)
var string
Type: mixed
Overrides:
[ Top ]
$remCookieDomain = ''
[line 96]
The cookie domain
var string
Type: mixed
Overrides:
[ Top ]
$remCookieName = 'ckSavePass'
[line 91]
The name of the cookie which we will use if user wants to be remembered by the system
var string
Type: mixed
Overrides:
[ Top ]
$remTime = 2592000
[line 86]
When user wants the system to remember him/her, how much time to keep the cookie? (seconds)
var int
Type: mixed
Overrides:
[ Top ]
$sessionVariable = 'userSessionValue'
[line 70]
The session variable ($_SESSION[$sessionVariable]) which will hold the data while the user is logged on
var string
Type: mixed
Overrides:
[ Top ]
$tbFields = array(
'userID'=> 'userID',
'login' => 'username',
'pass' => 'password',
'email' => 'email',
'active'=> 'active'
)
[line 75]
Those are the fields that our table uses in order to fetch the needed data. The structure is 'fieldType' => 'fieldName'
var array
Type: mixed
Overrides:
[ Top ]
$userData = array()
[line 110]
Type: mixed
Overrides:
[ Top ]
$userID
[line 108]
Type: mixed
Overrides:
[ Top ]
Class Methods
flexibleAccess
void flexibleAccess(
[string
$dbConn = ''])
[line 117]
Class Constructure
Parameters:
- string $dbConn -
[ Top ]
activate
bool activate(
)
[line 233]
Activates the user account
Parameters:
[ Top ]
error
bool error(
string
$error, [int
$line = ''], [bool
$die = false])
[line 323]
Error holder for the class
Tags:
- access - private
Parameters:
- string $error -
- int $line -
- bool $die -
[ Top ]
escape
string escape(
string
$str)
[line 308]
Produces the result of addslashes() with more safety
Tags:
- access - private
Parameters:
- string $str -
[ Top ]
get_property
string get_property(
string
$property)
[line 206]
Get a property of a user. You should give here the name of the field that you seek from the user table
Parameters:
- string $property -
[ Top ]
insertUser
void insertUser(
$data)
[line 251]
Parameters:
- $data -
[ Top ]
is
bool is(
$prop)
[line 197]
Function to determine if a property is true or false
param string $prop
Parameters:
- $prop -
[ Top ]
is_active
bool is_active(
)
[line 216]
Is the user an active user?
Parameters:
[ Top ]
is_loaded
void is_loaded(
)
[line 225]
Is the user loaded?
@ return bool
Parameters:
[ Top ]
loadUser
bool loadUser(
string
$userID)
[line 291]
A function that is used to load one user's data
Tags:
- access - private
Parameters:
- string $userID -
[ Top ]
login
bool login(
string
$uname, string
$password, [
$remember = false], [bool
$loadUser = true])
[line 144]
Login function
Parameters:
- string $uname -
- string $password -
- bool $loadUser -
- $remember -
[ Top ]
logout
bool logout(
[
$redirectTo = ''])
[line 183]
Logout function
param string $redirectTo
Parameters:
- $redirectTo -
[ Top ]
query
string query(
string
$sql, [
$line = 'Uknown'])
[line 276]
SQL query function
Tags:
- access - private
Parameters:
- string $sql -
- $line -
[ Top ]