Auth Objects - inc/auth.php

This file provides the main interface to the objectified auth backend. Old style auth functions are handled here and are passed to the appropriate auth object methods.

Note the three new functions included in this file. Several other methods make up the complete object interface, but since there is no need to access them through existing Dokuwiki code I haven't provided any translation mechanism to allow non-object versions to co-exist with object versions.

  1. bool auth_canDo($fn)
    • query an auth backend to see whether it supports a function or not.
    • At present meaningful values for $fn are 'checkPass', 'getUserData', 'createUser', 'modifyUser', 'deleteUsers', 'getUserCount', 'retrieveUsers', 'joinGroup', 'leaveGroup', 'addGroup', 'retrieveGroups'
    • returns true if the $fn is supported, false if it isn't
  2. bool auth_modifyUser($user,$changes)
    • update $user with $changes
    • $changes is an associative array (key ⇒ value). key the field to be changed, value is the new value
    • returns true on successful update, false otherwise.
  3. int auth_deleteUsers($users)
    • $users an array of user-ids
    • returns the number of users deleted. Callers should compare the number deleted with the expected result to determine success or failure.

inc/auth.php

Unable to display file "dokuwiki/inc/auth.php": It may not exist, or permission may be denied.

 
tutorials/auth_objects_auth.php.txt · Last modified: 2005/10/20 22:24 by chris
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki