[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/lib/plugins/usermanager/ -> admin.php (summary)

(no description)

File Size: 1235 lines (42 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

admin_plugin_usermanager:: (31 methods):
  __construct()
  getMenuText()
  getMenuSort()
  getStart()
  getPagesize()
  setLastdisabled()
  handle()
  html()
  isAccessibleByCurrentUser()
  htmlUserForm()
  htmlInputField()
  htmlFilter()
  htmlFilterSettings()
  htmlImportForm()
  addUser()
  deleteUser()
  editUser()
  modifyUser()
  notifyUser()
  verifyPassword()
  retrieveUser()
  setFilter()
  retrieveFilter()
  validatePagination()
  pagination()
  exportCSV()
  importCSV()
  cleanImportUser()
  importUser()
  downloadImportFailures()
  isUploadedFile()


Class: admin_plugin_usermanager  - X-Ref

All DokuWiki plugins to extend the admin function
need to inherit from this class

__construct()   X-Ref
Constructor


getMenuText($language)   X-Ref
Return prompt for admin menu

param: string $language
return: string

getMenuSort()   X-Ref
return sort order for position in admin menu

return: int

getStart()   X-Ref

return: int current start value for pageination

getPagesize()   X-Ref

return: int number of users per page

setLastdisabled($lastdisabled)   X-Ref

param: boolean $lastdisabled

handle()   X-Ref
Handle user request

return: bool

html()   X-Ref
Output appropriate html

return: bool

isAccessibleByCurrentUser()   X-Ref
User Manager is only available if the auth backend supports it

return: bool

htmlUserForm($cmd, $user = '', $userdata = array()   X-Ref
Display form to add or modify a user

param: string $cmd 'add' or 'modify'
param: string $user id of user
param: array  $userdata array with name, mail, pass and grps
param: int    $indent

htmlInputField($id, $name, $label, $value, $cando, $required, $indent = 0)   X-Ref
Prints a inputfield

param: string $id
param: string $name
param: string $label
param: string $value
param: bool   $cando whether auth backend is capable to do this action
param: bool   $required is this field required?
param: int $indent

htmlFilter($key)   X-Ref
Returns htmlescaped filter value

param: string $key name of search field
return: string html escaped value

htmlFilterSettings($indent = 0)   X-Ref
Print hidden inputs with the current filter values

param: int $indent

htmlImportForm($indent = 0)   X-Ref
Print import form and summary of previous import

param: int $indent

addUser()   X-Ref
Add an user to auth backend

return: bool whether succesful

deleteUser()   X-Ref
Delete user from auth backend

return: bool whether succesful

editUser($param)   X-Ref
Edit user (a user has been selected for editing)

param: string $param id of the user
return: bool whether succesful

modifyUser()   X-Ref
Modify user in the auth backend (modified user data has been recieved)

return: bool whether succesful

notifyUser($user, $password, $status_alert = true)   X-Ref
Send password change notification email

param: string $user         id of user
param: string $password     plain text
param: bool   $status_alert whether status alert should be shown
return: bool whether succesful

verifyPassword($password, $confirm)   X-Ref
Verify password meets minimum requirements
:TODO: extend to support password strength

param: string  $password   candidate string for new password
param: string  $confirm    repeated password for confirmation
return: bool   true if meets requirements, false otherwise

retrieveUser($clean = true)   X-Ref
Retrieve & clean user data from the form

param: bool $clean whether the cleanUser method of the authentication backend is applied
return: array (user, password, full name, email, array(groups))

setFilter($op)   X-Ref
Set the filter with the current search terms or clear the filter

param: string $op 'new' or 'clear'

retrieveFilter()   X-Ref
Get the current search terms

return: array

validatePagination()   X-Ref
Validate and improve the pagination values


pagination()   X-Ref
Return an array of strings to enable/disable pagination buttons

return: array with enable/disable attributes

exportCSV()   X-Ref
Export a list of users in csv format using the current filter criteria


importCSV()   X-Ref
Import a file of users in csv format

csv file should have 4 columns, user_id, full name, email, groups (comma separated)

return: bool whether successful

cleanImportUser($candidate, & $error)   X-Ref
Returns cleaned user data

param: array $candidate raw values of line from input file
param: string $error
return: array|false cleaned data or false

importUser($user, &$error)   X-Ref
Adds imported user to auth backend

Required a check of canDo('addUser') before

param: array  $user   data of user
param: string &$error reference catched error message
return: bool whether successful

downloadImportFailures()   X-Ref
Downloads failures as csv file


isUploadedFile($file)   X-Ref
wrapper for is_uploaded_file to facilitate overriding by test suite

param: string $file filename
return: bool