ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
|
Public Member Functions | |
Auth_Container_MDB ($dsn) | |
Constructor of the container class. More... | |
_connect ($dsn) | |
Connect to database by using the given DSN string. More... | |
_prepare () | |
Prepare database connection. More... | |
query ($query) | |
Prepare query to the database. More... | |
_setDefaults () | |
Set some default options. More... | |
_parseOptions ($array) | |
Parse options passed to the container class. More... | |
_quoteDBFields () | |
Quote the db_fields option to avoid the possibility of SQL injection. More... | |
fetchData ($username, $password, $isChallengeResponse=false) | |
Get user information from database. More... | |
listUsers () | |
Returns a list of users from the container. More... | |
addUser ($username, $password, $additional="") | |
Add user to the storage container. More... | |
removeUser ($username) | |
Remove user from the storage container. More... | |
changePassword ($username, $password) | |
Change password for user in the storage container. More... | |
supportsChallengeResponse () | |
Determine if this container supports password authentication with challenge response. More... | |
getCryptType () | |
Returns the selected crypt type for this container. More... | |
![]() | |
Auth_Container () | |
Constructor. More... | |
fetchData ($username, $password, $isChallengeResponse=false) | |
Fetch data from storage container. More... | |
verifyPassword ($password1, $password2, $cryptType="md5") | |
Crypt and verfiy the entered password. More... | |
supportsChallengeResponse () | |
Returns true if the container supports Challenge Response password authentication. More... | |
getCryptType () | |
Returns the crypt current crypt type of the container. More... | |
listUsers () | |
List all users that are available from the storage container. More... | |
getUser ($username) | |
Returns a user assoc array. More... | |
addUser ($username, $password, $additional=null) | |
Add a new user to the storage container. More... | |
removeUser ($username) | |
Remove user from the storage container. More... | |
changePassword ($username, $password) | |
Change password for user in the storage container. More... | |
log ($message, $level=AUTH_LOG_DEBUG) | |
Log a message to the Auth log. More... | |
![]() | |
loginObserver ($a_username, $a_auth) | |
Called after successful login. More... | |
failedLoginObserver ($a_username, $a_auth) | |
Called after failed login. More... | |
checkAuthObserver ($a_username, $a_auth) | |
Called after check auth requests. More... | |
logoutObserver ($a_username, $a_auth) | |
Called after logout. More... | |
supportsCaptchaVerification () | |
Returns whether or not the auth container supports the verification of captchas This should be true for those auth methods, which are available in the default login form. More... | |
Data Fields | |
$options = array() | |
$db = null | |
$dsn = '' | |
$activeUser = '' | |
![]() | |
$activeUser = "" | |
User that is currently selected from the storage container. More... | |
$_auth_obj = null | |
The Auth object this container is attached to. More... | |
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 |
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) |
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 |
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 | ( | ) |
Auth_Container_MDB::listUsers | ( | ) |
Returns a list of users from the container.
Definition at line 387 of file MDB.php.
References $query, $res, _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 |
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 | ( | ) |
Auth_Container_MDB::$dsn = '' |
Definition at line 67 of file MDB.php.
Referenced by _connect(), and Auth_Container_MDB().