pgsqlcommands Class Reference

Inheritance diagram for pgsqlcommands:

iDatabaseCommands

List of all members.

Public Member Functions

 createNewUser ($pDb, $sFirstName, $sLastName, $sFieldOfStudy, $sEmail, $sPw)
 deleteUser ($pDb, $sUserID)
 changeUserPassword ($pDb, $sUserEmail, $sNewPw)
 changeAdminPassword ($pDb, $sAdminName, $sNewPw)
 createTrainingData ($pDb, $sUserID, $sPw)
 getLoginData ($pDb, $sUserName)
 getLoginDataById ($pDb, $sUserID)
 setLastLoginDate ($pDb, $sUserName)
 resetAllUserDb ($pDb)
 buildUserTable ($pDb)
 changeUserInfo ($pDb, $sUserID, $sFirstName, $sLastName, $sFieldOfStudy)
 showActualDataUserDB ($pDb, $sUserID, $sPw)


Detailed Description

PostgreSQL commands handler.

Author:
Stephan Schuetz, stephan.schuetz(at)fhnw.ch
Date:
14.10.2007
Version:
1.0
(c) Copyright GITTA 2007. Creative Commons License "Attribution-Noncommercial-Share Alike" http://creativecommons.org/licenses/by-nc-sa/3.0/

Member Function Documentation

pgsqlcommands::createNewUser ( pDb,
sFirstName,
sLastName,
sFieldOfStudy,
sEmail,
sPw 
)

Creates a new user.

Parameters:
$pDb Pointer to database connection.
$sFirstName First name of new user.
$sLastName Last name of new user.
$sFieldOfStudy Field of study of the new user.
$sEmail E-mail address of the new user.
$sPw Password of the new user.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::deleteUser ( pDb,
sUserID 
)

Delete a user.

Parameters:
$pDb Pointer to database connection.
$sUserID ID of the user to delete.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::changeUserPassword ( pDb,
sUserEmail,
sNewPw 
)

Change user password.

Parameters:
$pDb Pointer to database connection.
$sUserEmail E-mail address of the user which wants to change his password.
$sNewPw New password.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::changeAdminPassword ( pDb,
sAdminName,
sNewPw 
)

Change administrator password.

Parameters:
$pDb Pointer to database connection.
$sAdminName Name of the administrator user.
$sNewPw New password.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::createTrainingData ( pDb,
sUserID,
sPw 
)

Creates training data or resets user database to initial values.

Parameters:
$pDb Pointer to database connection.
$sUserID User ID.
$sPw Password.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::getLoginData ( pDb,
sUserName 
)

Get login data by user name (e-mail address).

Parameters:
$pDb Pointer to database connection.
$sUserName User name (e-mail address).
Returns:
Array with login data (0: User ID, 1: Last name, 2: First name, 3: Password, 4: Field of study, 5: E-mail address) on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::getLoginDataById ( pDb,
sUserID 
)

Get login data by user ID.

Parameters:
$pDb Pointer to database connection.
$sUserID User ID.
Returns:
Array with login data (0: User ID, 1: Last name, 2: First name, 3: Password, 4: Field of study, 5: E-mail address) on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::setLastLoginDate ( pDb,
sUserName 
)

Set login date (format Y-M-D, e.g. 2007-10-14) of user (actual date used, according to server date).

Parameters:
$pDb Pointer to database connection.
$sUserName E-mail address of the user.

Implements iDatabaseCommands.

pgsqlcommands::resetAllUserDb ( pDb  ) 

Reset all user databases.

Parameters:
$pDb Pointer to database connection.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::buildUserTable ( pDb  ) 

Build table for user administration.

Parameters:
$pDb Pointer to database connection.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::changeUserInfo ( pDb,
sUserID,
sFirstName,
sLastName,
sFieldOfStudy 
)

Change user information.

Parameters:
$pDb Pointer to database connection.
$sUserID User ID.
$sFirstName New first name.
$sLastName New last name.
$sFieldOfStudy New field of study.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.

pgsqlcommands::showActualDataUserDB ( pDb,
sUserID,
sPw 
)

Builds table which shows the actual data in the database.

Parameters:
$pDb Pointer to database connection.
$sUserID User ID.
$sPw Password.
Returns:
True on success, otherwise false.

Implements iDatabaseCommands.


The documentation for this class was generated from the following file:
Generated on Sun Dec 2 19:47:28 2007 for elSQL - e-learn SQL by  doxygen 1.5.3