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

Class: DatabaseUser

Source Location: /auth.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --User
            |
            --DatabaseUser

DatabaseUser can be used to authenticate a user against a database table.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: User

User::__construct()
User::authenticate()
Authenticate the user in the system with the specified username and password.
User::readLogged()
Specifies whether the user is logged or not, this property should be updated by the Authenticate method
User::writeLogged()

Class: Component

Component::__construct()
Component constructor
Component::ajaxCall()
Dumps the javascript code to make an ajax call to the server.
Component::callEvent()
Calls a server event.
Component::defaultName()
Component::defaultTag()
Component::dumpChildrenFormItems()
This method is called by the page just after dumping the starting form tag.
Component::dumpChildrenHeaderCode()
Dumps the header code for all the children
Component::dumpChildrenJavascript()
Dumps the javascript code for all the children
Component::dumpFormItems()
Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
Component::dumpHeaderCode()
Dumps header code required
Component::dumpHiddenKeyFields()
Dumps hidden field values for the key record
Component::dumpJavascript()
Dumps the javascript code needed by this component
Component::dumpJSEvent()
Dumps javascript code for an event
Component::fixupProperty()
Resolves the right reference to an object property
Component::generateAjaxEvent()
Returns the javascript code to generate an ajax call.
Component::getName()
Specifies the name for the component. The name is used as an identifier and should be unique.
Component::getTag()
A versatile property of every Component that can be used in any way you want
Component::hasValidDataField()
Returns true if a valid data field is attached to the component
Component::init()
Initializes a component
Component::insertComponent()
Inserts a component into the component's collection
Component::loaded()
Initializes the component after the form file has been read into memory.
Component::loadedChildren()
Calls childrens loaded
Component::loadResource()
Loads this component from a string
Component::preinit()
Method called before init()
Component::readAccessibility()
Provides accessibility info to the embedded RPC engine.
Component::readComponentCount()
Indicates the number of components owned by the component.
Component::readComponents()
Lists all the components owned by this component.
Component::readControlState()
A flag to know the state of the control, csLoading, csDesigning
Component::readDataFieldValue()
This property returns the value of the datafield if any.
Component::readFromResource()
Reads a component from a resource file
Component::readNamePath()
Specifies the path to uniquely identify a component, qualified by the owner when required.
Component::readOwner()
Indicates the component that is responsible for streaming and freeing this component.
Component::removeComponent()
Removes a component from the component's collection
Component::serializeChildren()
Serializes all children
Component::setName()
Component::setTag()
Component::unserializeChildren()
Unserializes all children by calling unserialize for all the components
Component::updateDataField()
Updates the field on the dataset attached, if any
Component::writeControlState()

Class: Persistent

Persistent::allowserialize()
This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
Persistent::assign()
Assigns the source properties to this object.
Persistent::assignError()
Raises an assignation error.
Persistent::assignTo()
Assigns this object to another object.
Persistent::inSession()
This method determines if this object exists in the current session.
Persistent::readNamePath()
Used to serialize/unserialize. It returns the full path to identify this component.
Persistent::readOwner()
Owner of the component.
Persistent::serialize()
Stores this object into the session.
Persistent::unserialize()
This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Class: Object

Object::__construct()
Constructs an object and initializes its data before the object is first used.
Object::className()
Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
Object::classNameIs()
Determines whether an object is of a specific type.
Object::classParent()
Returns the type of the immediate ancestor of a class.
Object::inheritsFrom()
Determines the relationship of two object types.
Object::methodExists()
Check if a method exists declared on this object instance.
Object::readProperty()
Reads a property from the streams
Object::__get()
To virtualize properties
Object::__set()
To virtualize properties

Class Details

[line 96]
DatabaseUser can be used to authenticate a user against a database table.

Use this class to authenticate an user against a database, in which are stored all user details, like username and password.

To make it work, set DriverName, Host, User, Password, FieldName and TableName to allow the component to find the information to authenticate.




Tags:



[ Top ]


Class Variables

$_databasename = ""

[line 101]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_drivername = ""

[line 100]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_host = ""

[line 102]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_logged =

[line 98]



Tags:

access:  protected

Type:   mixed
Overrides:   Array


[ Top ]

$_password = ""

[line 104]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_passwordfieldname = ""

[line 108]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_user = ""

[line 103]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_usernamefieldname = ""

[line 107]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_userstable = ""

[line 106]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


method authenticate [line 207]

void authenticate( string $username, $password, string $passwrod)

Authenticate a user against the database table, after call this method, check Logged property to know if the operation was successful or not



Tags:

see:  getLogged()


Overrides User::authenticate() (Authenticate the user in the system with the specified username and password.)

Parameters:

string   $username   Username to authenticate
string   $passwrod   Password of the user
   $password  

[ Top ]

method getDatabaseName [line 163]

string getDatabaseName( )

Name of the database that holds the table to use to authenticate users



Tags:



[ Top ]

method getDriverName [line 153]

string getDriverName( )

Type of database server that stores the table that holds usernames and passwords, it uses a Database component, so the value for this property is the same as the Database::DriverName property



Tags:



[ Top ]

method getHost [line 174]

string getHost( )

Host of the server of the internal Database component to access the table holding username/password combinations



Tags:



[ Top ]

method getPassword [line 195]

string getPassword( )

Password to the database server holding the table to be used for authentication



Tags:



[ Top ]

method getPasswordFieldName [line 141]

string getPasswordFieldName( )

Field name of the column that stores the password, this property will be used to determine the field to look for passwords



Tags:



[ Top ]

method getUser [line 185]

string getUser( )

Username to access the database server looking for username/password table



Tags:



[ Top ]

method getUserNameFieldName [line 130]

string getUserNameFieldName( )

Field name of the column that stores the user name, this property will be used to determine the field to look for usernames



Tags:



[ Top ]

method getUsersTable [line 119]

string getUsersTable( )

Table that stores the user information, the table must have columns to store usernames and passwords, the name for that columns can be set using UserNameFieldName and PasswordFieldName properties



Tags:



[ Top ]

method setDatabaseName [line 164]

void setDatabaseName( $value)



Parameters:

   $value  

[ Top ]

method setDriverName [line 154]

void setDriverName( $value)



Parameters:

   $value  

[ Top ]

method setHost [line 175]

void setHost( $value)



Parameters:

   $value  

[ Top ]

method setPassword [line 196]

void setPassword( $value)



Parameters:

   $value  

[ Top ]

method setPasswordFieldName [line 142]

void setPasswordFieldName( $value)



Parameters:

   $value  

[ Top ]

method setUser [line 186]

void setUser( $value)



Parameters:

   $value  

[ Top ]

method setUserNameFieldName [line 131]

void setUserNameFieldName( $value)



Parameters:

   $value  

[ Top ]

method setUsersTable [line 120]

void setUsersTable( $value)



Parameters:

   $value  

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:50:55 -0700 by phpDocumentor 1.4.1