[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
DokuWiki Plugin authpdo (Auth Component)
Author: | Andreas Gohr |
License: | GPL 2 http://www.gnu.org/licenses/gpl-2.0.html |
File Size: | 787 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
auth_plugin_authpdo:: (21 methods):
__construct()
checkPass()
getUserData()
createUser()
modifyUser()
deleteUsers()
retrieveUsers()
getUserCount()
addGroup()
retrieveGroups()
selectUser()
deleteUser()
selectUserGroups()
selectGroups()
clearGroupCache()
joinGroup()
leaveGroup()
query()
debugMsg()
checkConfig()
debugSQL()
Class: auth_plugin_authpdo - X-Ref
Class auth_plugin_authpdo__construct() X-Ref |
Constructor. |
checkPass($user, $pass) X-Ref |
Check user+password param: string $user the user name param: string $pass the clear text password return: bool |
getUserData($user, $requireGroups = true) X-Ref |
Return user info Returns info about the given user needs to contain at least these fields: name string full name of the user mail string email addres of the user grps array list of groups the user is in param: string $user the user name param: bool $requireGroups whether or not the returned data must include groups return: array|bool containing user data or false |
createUser($user, $clear, $name, $mail, $grps = null) X-Ref |
Create a new User [implement only where required/possible] Returns false if the user already exists, null when an error occurred and true if everything went well. The new user HAS TO be added to the default group by this function! Set addUser capability when implemented param: string $user param: string $clear param: string $name param: string $mail param: null|array $grps return: bool|null |
modifyUser($user, $changes) X-Ref |
Modify user data param: string $user nick of the user to be changed param: array $changes array of field/value pairs to be changed (password will be clear text) return: bool |
deleteUsers($users) X-Ref |
Delete one or more users Set delUser capability when implemented param: array $users return: int number of users deleted |
retrieveUsers($start = 0, $limit = -1, $filter = null) X-Ref |
Bulk retrieval of user data [implement only where required/possible] Set getUsers capability when implemented param: int $start 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, null for no filter return: array list of userinfo (refer getUserData for internal userinfo details) |
getUserCount($filter = []) X-Ref |
Return a count of the number of user which meet $filter criteria param: array $filter array of field/pattern pairs, empty array for no filter return: int |
addGroup($group) X-Ref |
Create a new group with the given name param: string $group return: bool |
retrieveGroups($start = 0, $limit = 0) X-Ref |
Retrieve groups Set getGroups capability when implemented param: int $start param: int $limit return: array |
selectUser($user) X-Ref |
Select data of a specified user param: string $user the user name return: bool|array user data, false on error |
deleteUser($user) X-Ref |
Delete a user after removing all their group memberships param: string $user return: bool true when the user was deleted |
selectUserGroups($userdata) X-Ref |
Select all groups of a user param: array $userdata The userdata as returned by _selectUser() return: array|bool list of group names, false on error |
selectGroups() X-Ref |
Select all available groups return: array|bool list of all available groups and their properties |
clearGroupCache() X-Ref |
Remove all entries from the group cache |
joinGroup($userdata, $groupdata) X-Ref |
Adds the user to the group param: array $userdata all the user data param: array $groupdata all the group data return: bool |
leaveGroup($userdata, $groupdata) X-Ref |
Removes the user from the group param: array $userdata all the user data param: array $groupdata all the group data return: bool |
query($sql, $arguments = []) X-Ref |
Executes a query param: string $sql The SQL statement to execute param: array $arguments Named parameters to be used in the statement return: array|int|bool The result as associative array for SELECTs, affected rows for others, false on error |
debugMsg($message, $err = 0, $line = 0) X-Ref |
Wrapper around msg() but outputs only when debug is enabled param: string|Exception $message param: int $err param: int $line |
checkConfig($keys) X-Ref |
Check if the given config strings are set param: string[] $keys return: bool author: Matthias Grimm <matthiasgrimm@users.sourceforge.net> |
debugSQL($sql, $params, $htmlescape = true) X-Ref |
create an approximation of the SQL string with parameters replaced param: string $sql param: array $params param: bool $htmlescape Should the result be escaped for output in HTML? return: string |