ILIAS
Release_4_1_x_branch Revision 61804
|
Public Member Functions | |
Auth_Container_MDB ($dsn) | |
Constructor of the container class. | |
_connect ($dsn) | |
Connect to database by using the given DSN string. | |
_prepare () | |
Prepare database connection. | |
query ($query) | |
Prepare query to the database. | |
_setDefaults () | |
Set some default options. | |
_parseOptions ($array) | |
Parse options passed to the container class. | |
_quoteDBFields () | |
Quote the db_fields option to avoid the possibility of SQL injection. | |
fetchData ($username, $password, $isChallengeResponse=false) | |
Get user information from database. | |
listUsers () | |
Returns a list of users from the container. | |
addUser ($username, $password, $additional="") | |
Add user to the storage container. | |
removeUser ($username) | |
Remove user from the storage container. | |
changePassword ($username, $password) | |
Change password for user in the storage container. | |
supportsChallengeResponse () | |
Determine if this container supports password authentication with challenge response. | |
getCryptType () | |
Returns the selected crypt type for this container. | |
Public Member Functions inherited from Auth_Container | |
Auth_Container () | |
Constructor. | |
verifyPassword ($password1, $password2, $cryptType="md5") | |
Crypt and verfiy the entered password. | |
getUser ($username) | |
Returns a user assoc array. | |
log ($message, $level=AUTH_LOG_DEBUG) | |
Log a message to the Auth log. | |
Public Member Functions inherited from ilAuthContainerBase | |
loginObserver ($a_username, $a_auth) | |
Called after successful login. | |
failedLoginObserver ($a_username, $a_auth) | |
Called after failed login. | |
checkAuthObserver ($a_username, $a_auth) | |
Called after check auth requests. | |
logoutObserver ($a_username, $a_auth) | |
Called after logout. |
Data Fields | |
$options = array() | |
$db = null | |
$dsn = '' | |
$activeUser = '' | |
Data Fields inherited from Auth_Container | |
$activeUser = "" | |
User that is currently selected from the storage container. | |
$_auth_obj = null | |
The Auth object this container is attached to. |
Auth_Container_MDB::_connect | ( | $dsn | ) |
Connect to database by using the given DSN string.
private
mixed | DSN string | array | mdb object |
Definition at line 110 of file MDB.php.
References $dsn, $t, AUTH_LOG_DEBUG, PEAR\isError(), Auth_Container\log(), PEAR_ERROR_RETURN, and PEAR\raiseError().
Referenced by _prepare().
Auth_Container_MDB::_parseOptions | ( | $array | ) |
Parse options passed to the container class.
private
array |
Definition at line 229 of file MDB.php.
Referenced by Auth_Container_MDB().
Auth_Container_MDB::_prepare | ( | ) |
Prepare database connection.
This function checks if we have already opened a connection to the database. If that's not the case, a new connection is opened.
private
Definition at line 165 of file MDB.php.
References _connect().
Referenced by addUser(), changePassword(), fetchData(), listUsers(), query(), and removeUser().
Auth_Container_MDB::_quoteDBFields | ( | ) |
Quote the db_fields option to avoid the possibility of SQL injection.
private
Definition at line 248 of file MDB.php.
Referenced by fetchData(), and listUsers().
Auth_Container_MDB::_setDefaults | ( | ) |
Set some default options.
private
Definition at line 207 of file MDB.php.
Referenced by Auth_Container_MDB().
Auth_Container_MDB::addUser | ( | $username, | |
$password, | |||
$additional = "" |
|||
) |
Add user to the storage container.
public
string | Username |
string | Password |
mixed | Additional information that are stored in the DB |
Reimplemented from Auth_Container.
Definition at line 450 of file MDB.php.
References $additional, $query, $res, _prepare(), AUTH_LOG_DEBUG, Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB::Auth_Container_MDB | ( | $dsn | ) |
Constructor of the container class.
Initate connection to the database via PEAR::MDB
string | Connection data or MDB object |
Definition at line 86 of file MDB.php.
References $dsn, _parseOptions(), _setDefaults(), and PEAR\raiseError().
Auth_Container_MDB::changePassword | ( | $username, | |
$password | |||
) |
Change password for user in the storage container.
string | Username |
string | The new password (plain text) |
Reimplemented from Auth_Container.
Definition at line 552 of file MDB.php.
References $query, $res, _prepare(), AUTH_LOG_DEBUG, Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB::fetchData | ( | $username, | |
$password, | |||
$isChallengeResponse = false |
|||
) |
Get user information from database.
This function uses the given username to fetch the corresponding login data from the database table. If an account that matches the passed username and password is found, the function returns true. Otherwise it returns false.
string | Username |
string | Password |
boolean | If true password is secured using a md5 hash the frontend and auth are responsible for making sure the container supports challenge response password authentication |
Reimplemented from Auth_Container.
Definition at line 294 of file MDB.php.
References $query, $res, _prepare(), _quoteDBFields(), AUTH_LOG_DEBUG, PEAR\isError(), Auth_Container\log(), PEAR\raiseError(), and Auth_Container\verifyPassword().
Auth_Container_MDB::getCryptType | ( | ) |
Returns the selected crypt type for this container.
Reimplemented from Auth_Container.
Definition at line 617 of file MDB.php.
Auth_Container_MDB::listUsers | ( | ) |
Returns a list of users from the container.
Reimplemented from Auth_Container.
Definition at line 387 of file MDB.php.
References $query, $res, $user, _prepare(), _quoteDBFields(), AUTH_LOG_DEBUG, Auth_Container\log(), and PEAR\raiseError().
Auth_Container_MDB::query | ( | $query | ) |
Prepare query to the database.
This function checks if we have already opened a connection to the database. If that's not the case, a new connection is opened. After that the query is passed to the database.
public
string | Query string |
Definition at line 188 of file MDB.php.
References $query, _prepare(), AUTH_LOG_DEBUG, and Auth_Container\log().
Referenced by addUser(), changePassword(), and removeUser().
Auth_Container_MDB::removeUser | ( | $username | ) |
Remove user from the storage container.
public
string | Username |
Reimplemented from Auth_Container.
Definition at line 513 of file MDB.php.
References $query, $res, _prepare(), AUTH_LOG_DEBUG, Auth_Container\log(), query(), and PEAR\raiseError().
Auth_Container_MDB::supportsChallengeResponse | ( | ) |
Determine if this container supports password authentication with challenge response.
Reimplemented from Auth_Container.
Definition at line 604 of file MDB.php.
Auth_Container_MDB::$dsn = '' |
Definition at line 67 of file MDB.php.
Referenced by _connect(), and Auth_Container_MDB().