[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
[Code source] [Imprimer] [Statistiques]
PgSQL authentication backend
Author: | Andreas Gohr <andi@splitbrain.org> |
Author: | Chris Smith <chris@jalakai.co.uk> |
Author: | Matthias Grimm <matthias.grimmm@sourceforge.net> |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
Poids: | 408 lignes (14 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 1 fichier inc/auth/mysql.class.php |
auth_pgsql:: (13 méthodes):
auth_pgsql()
_chkcnf()
getUserCount()
retrieveUsers()
_addUserToGroup()
_addUser()
_openDB()
_closeDB()
_queryDB()
_modifyDB()
_lockTables()
_unlockTables()
_escape()
Classe: auth_pgsql - X-Ref
auth_pgsql() 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($uid, $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: $uid user id 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? |
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |