Class: flexibleAccess

Source Location: /access.class.php

Class Overview [line 35]


Flexible Access - The main class

Author(s):

Version:

Copyright:

Variables

Constants

Methods


Inherited Variables

Inherited Constants

Inherited Methods



Class Details

Flexible Access - The main class

[ Top ]


Class Variables

$dbConn

[line 110]

Type: mixed

Overrides:

[ Top ]

$dbHost =  'localhost'

[line 46]

The database host

var string

Type: mixed

Overrides:

[ Top ]

$dbName =  'database'

[line 41]

The database that we will use

var string

Type: mixed

Overrides:

[ Top ]

$dbPass =  'password'

[line 61]

The database password

var string

Type: mixed

Overrides:

[ Top ]

$dbPort =  3306

[line 51]

The database port

var int

Type: mixed

Overrides:

[ Top ]

$dbTable =  'users'

[line 66]

The database table that holds all the information

var string

Type: mixed

Overrides:

[ Top ]

$dbUser =  'user'

[line 56]

The database user

var string

Type: mixed

Overrides:

[ Top ]

$displayErrors =  true

[line 107]

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 102]

The method used to encrypt the password. It can be sha1, md5 or nothing (no encryption)

var string

Type: mixed

Overrides:

[ Top ]

$remCookieDomain =  ''

[line 97]

The cookie domain

var string

Type: mixed

Overrides:

[ Top ]

$remCookieName =  'ckSavePass'

[line 92]

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 87]

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 71]

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 76]

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 111]

Type: mixed

Overrides:

[ Top ]

$userID

[line 109]

Type: mixed

Overrides:

[ Top ]


Class Methods

flexibleAccess

void flexibleAccess( [string $dbConn = ''], [array $settings = ''])

[line 119]

Class Constructure

Parameters:

  • string $dbConn -
  • array $settings -

[ Top ]

activate

bool activate( )

[line 238]

Activates the user account

Parameters:

[ Top ]

get_property

string get_property( string $property)

[line 211]

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 256]

Parameters:

  • $data -

[ Top ]

is

bool is( $prop)

[line 202]

Function to determine if a property is true or false

param string $prop

Parameters:

  • $prop -

[ Top ]

is_active

bool is_active( )

[line 221]

Is the user an active user?

Parameters:

[ Top ]

is_loaded

void is_loaded( )

[line 230]

Is the user loaded?

@ return bool

Parameters:

[ Top ]

login

bool login( string $uname, string $password, [ $remember = false], [bool $loadUser = true])

[line 153]

Login function

Parameters:

  • string $uname -
  • string $password -
  • bool $loadUser -
  • $remember -

[ Top ]

logout

bool logout( [ $redirectTo = ''])

[line 188]

Logout function

param string $redirectTo

Parameters:

  • $redirectTo -

[ Top ]

randomPass

void randomPass( [ $length = 10], [ $chrs = '1234567890qwertyuiopasdfghjklzxcvbnm'])

[line 277]

Parameters:

  • $length -
  • $chrs -

[ Top ]


Class Constants


Documentation generated on Sat, 10 Nov 2007 12:38:07 +0200 by phpDocumentor 1.3.2