[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 431 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
auth_plugin_authpgsql:: (13 methods):
__construct()
_chkcnf()
getUserCount()
retrieveUsers()
_addUserToGroup()
_addUser()
_openDB()
_closeDB()
_queryDB()
_modifyDB()
_lockTables()
_unlockTables()
_escape()
Class: auth_plugin_authpgsql - X-Ref
PostgreSQL authentication backend__construct() X-Ref |
Constructor checks if the pgsql interface is available, otherwise it will set the variable $success of the basis class to false author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> author: Andreas Gohr <andi@splitbrain.org> |
_chkcnf($keys, $wop = false) X-Ref |
Check if the given config strings are set author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: bool param: string[] $keys param: bool $wop |
getUserCount($filter = array() X-Ref |
Counts users which meet certain $filter criteria. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: int count of found users. param: array $filter filter criteria in item/pattern pairs |
retrieveUsers($first = 0, $limit = 0, $filter = array() X-Ref |
Bulk retrieval of user data author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: array userinfo (refer getUserData for internal userinfo details) param: int $first index of first user to be returned param: int $limit max number of users to be returned param: array $filter array of field/pattern pairs |
_addUserToGroup($user, $group, $force = false) X-Ref |
Adds a user to a group. If $force is set to true non existing groups would be created. The database connection must already be established. Otherwise this function does nothing and returns 'false'. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> author: Andreas Gohr <andi@splitbrain.org> return: bool true on success, false on error param: string $user user to add to a group param: string $group name of the group param: bool $force create missing groups |
_addUser($user, $pwd, $name, $mail, $grps) X-Ref |
Adds a new User to the database. The database connection must already be established for this function to work. Otherwise it will return 'false'. author: Andreas Gohr <andi@splitbrain.org> author: Chris Smith <chris@jalakai.co.uk> author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: bool param: string $user login of the user param: string $pwd encrypted password param: string $name full name of the user param: string $mail email address param: array $grps array of groups the user should become member of |
_openDB() X-Ref |
Opens a connection to a database and saves the handle for further usage in the object. The successful call to this functions is essential for most functions in this object. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: bool |
_closeDB() X-Ref |
Closes a database connection. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
_queryDB($query) X-Ref |
Sends a SQL query to the database and transforms the result into an associative array. This function is only able to handle queries that returns a table such as SELECT. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: array|false the result table param: string $query SQL string that contains the query |
_modifyDB($query) X-Ref |
Executes an update or insert query. This differs from the MySQL one because it does NOT return the last insertID author: Andreas Gohr <andi@splitbrain.org> return: bool param: string $query |
_lockTables($mode) X-Ref |
Start a transaction author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: bool param: string $mode could be 'READ' or 'WRITE' |
_unlockTables() X-Ref |
Commit a transaction author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> return: bool |
_escape($string, $like = false) X-Ref |
Escape a string for insertion into the database author: Andreas Gohr <andi@splitbrain.org> return: string param: string $string The string to escape param: bool $like Escape wildcard chars as well? |