PHP 클래스 auth_plugin_authpdo, dokuwiki

상속: extends DokuWiki_Auth_Plugin
파일 보기 프로젝트 열기: splitbrain/dokuwiki

보호된 프로퍼티들

프로퍼티 타입 설명
$groupcache The list of all groups
$pdo PDO

공개 메소드들

메소드 설명
__construct ( ) Constructor.
addGroup ( string $group ) : boolean Create a new group with the given name
checkPass ( string $user, string $pass ) : boolean Check user+password
createUser ( string $user, string $clear, string $name, string $mail, null | array $grps = null ) : boolean | null Create a new User [implement only where required/possible]
deleteUsers ( array $users ) : integer Delete one or more users
getUserCount ( array $filter = [] ) : integer Return a count of the number of user which meet $filter criteria
getUserData ( string $user, boolean $requireGroups = true ) : array | boolean Return user info
modifyUser ( string $user, array $changes ) : boolean Modify user data
retrieveGroups ( integer $start, integer $limit ) : array Retrieve groups
retrieveUsers ( integer $start, integer $limit, array $filter = null ) : array Bulk retrieval of user data [implement only where required/possible]

보호된 메소드들

메소드 설명
_chkcnf ( string[] $keys ) : boolean Check if the given config strings are set
_clearGroupCache ( ) Remove all entries from the group cache
_debug ( string | Exception $message, integer $err, integer $line ) Wrapper around msg() but outputs only when debug is enabled
_debugSQL ( string $sql, array $params, boolean $htmlescape = true ) : string create an approximation of the SQL string with parameters replaced
_deleteUser ( string $user ) : boolean Delete a user after removing all their group memberships
_joinGroup ( array $userdata, array $groupdata ) : boolean Adds the user to the group
_leaveGroup ( array $userdata, array $groupdata ) : boolean Removes the user from the group
_query ( string $sql, array $arguments = [] ) : array | integer | boolean Executes a query
_selectGroups ( ) : array | boolean Select all available groups
_selectUser ( string $user ) : boolean | array Select data of a specified user
_selectUserGroups ( array $userdata ) : array | boolean Select all groups of a user

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( )

_chkcnf() 보호된 메소드

Check if the given config strings are set
저자: Matthias Grimm ([email protected])
protected _chkcnf ( string[] $keys ) : boolean
$keys string[]
리턴 boolean

_clearGroupCache() 보호된 메소드

Remove all entries from the group cache
protected _clearGroupCache ( )

_debug() 보호된 메소드

Wrapper around msg() but outputs only when debug is enabled
protected _debug ( string | Exception $message, integer $err, integer $line )
$message string | Exception
$err integer
$line integer

_debugSQL() 보호된 메소드

create an approximation of the SQL string with parameters replaced
protected _debugSQL ( string $sql, array $params, boolean $htmlescape = true ) : string
$sql string
$params array
$htmlescape boolean Should the result be escaped for output in HTML?
리턴 string

_deleteUser() 보호된 메소드

Delete a user after removing all their group memberships
protected _deleteUser ( string $user ) : boolean
$user string
리턴 boolean true when the user was deleted

_joinGroup() 보호된 메소드

Adds the user to the group
protected _joinGroup ( array $userdata, array $groupdata ) : boolean
$userdata array all the user data
$groupdata array all the group data
리턴 boolean

_leaveGroup() 보호된 메소드

Removes the user from the group
protected _leaveGroup ( array $userdata, array $groupdata ) : boolean
$userdata array all the user data
$groupdata array all the group data
리턴 boolean

_query() 보호된 메소드

Executes a query
protected _query ( string $sql, array $arguments = [] ) : array | integer | boolean
$sql string The SQL statement to execute
$arguments array Named parameters to be used in the statement
리턴 array | integer | boolean The result as associative array for SELECTs, affected rows for others, false on error

_selectGroups() 보호된 메소드

Select all available groups
protected _selectGroups ( ) : array | boolean
리턴 array | boolean list of all available groups and their properties

_selectUser() 보호된 메소드

Select data of a specified user
protected _selectUser ( string $user ) : boolean | array
$user string the user name
리턴 boolean | array user data, false on error

_selectUserGroups() 보호된 메소드

Select all groups of a user
protected _selectUserGroups ( array $userdata ) : array | boolean
$userdata array The userdata as returned by _selectUser()
리턴 array | boolean list of group names, false on error

addGroup() 공개 메소드

Create a new group with the given name
public addGroup ( string $group ) : boolean
$group string
리턴 boolean

checkPass() 공개 메소드

Check user+password
public checkPass ( string $user, string $pass ) : boolean
$user string the user name
$pass string the clear text password
리턴 boolean

createUser() 공개 메소드

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
public createUser ( string $user, string $clear, string $name, string $mail, null | array $grps = null ) : boolean | null
$user string
$clear string
$name string
$mail string
$grps null | array
리턴 boolean | null

deleteUsers() 공개 메소드

Set delUser capability when implemented
public deleteUsers ( array $users ) : integer
$users array
리턴 integer number of users deleted

getUserCount() 공개 메소드

Return a count of the number of user which meet $filter criteria
public getUserCount ( array $filter = [] ) : integer
$filter array array of field/pattern pairs, empty array for no filter
리턴 integer

getUserData() 공개 메소드

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
public getUserData ( string $user, boolean $requireGroups = true ) : array | boolean
$user string the user name
$requireGroups boolean whether or not the returned data must include groups
리턴 array | boolean containing user data or false

modifyUser() 공개 메소드

Modify user data
public modifyUser ( string $user, array $changes ) : boolean
$user string nick of the user to be changed
$changes array array of field/value pairs to be changed (password will be clear text)
리턴 boolean

retrieveGroups() 공개 메소드

Set getGroups capability when implemented
public retrieveGroups ( integer $start, integer $limit ) : array
$start integer
$limit integer
리턴 array

retrieveUsers() 공개 메소드

Set getUsers capability when implemented
public retrieveUsers ( integer $start, integer $limit, array $filter = null ) : array
$start integer index of first user to be returned
$limit integer max number of users to be returned
$filter array array of field/pattern pairs, null for no filter
리턴 array list of userinfo (refer getUserData for internal userinfo details)

프로퍼티 상세

$groupcache 보호되어 있는 프로퍼티

The list of all groups
protected $groupcache

$pdo 보호되어 있는 프로퍼티

protected PDO $pdo
리턴 PDO