[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
PgSQL authentication backend
Author: | Andreas Gohr |
Author: | Chris Smith |
Author: | Matthias Grimm |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
File Size: | 419 lines (15 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file inc/auth/mysql.class.php |
auth_pgsql:: (13 methods):
__construct()
_chkcnf()
getUserCount()
retrieveUsers()
_addUserToGroup()
_addUser()
_openDB()
_closeDB()
_queryDB()
_modifyDB()
_lockTables()
_unlockTables()
_escape()
Class: auth_pgsql - X-Ref
__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 |
getUserCount($filter=array() X-Ref |
[public function] Counts users which meet certain $filter criteria. author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> param: array $filter filter criteria in item/pattern pairs return: count of found users. |
retrieveUsers($first=0,$limit=10,$filter=array() X-Ref |
Bulk retrieval of user data. [public function] author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> param: first index of first user to be returned param: limit max number of users to be returned param: filter array of field/pattern pairs return: array of userinfo (refer getUserData for internal userinfo details) |
_addUserToGroup($user, $group, $force=0) X-Ref |
Adds a user to a group. If $force is set to '1' 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> param: $user user to add to a group param: $group name of the group param: $force '1' create missing groups return: bool 'true' on success, 'false' on error |
_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> param: $user login of the user param: $pwd encrypted password param: $name full name of the user param: $mail email address param: $grps array of groups the user should become member of return: bool |
_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> param: $query SQL string that contains the query return: array with the result table |
_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 |
_lockTables($mode) X-Ref |
Start a transaction author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> param: $mode could be 'READ' or 'WRITE' |
_unlockTables() X-Ref |
Commit a transaction author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
_escape($string,$like=false) X-Ref |
Escape a string for insertion into the database author: Andreas Gohr <andi@splitbrain.org> param: string $string The string to escape param: boolean $like Escape wildcard chars as well? |
Generated: Sun Feb 3 03:00:06 2013 | Cross-referenced by PHPXref 0.7 |