[ Index ]
 

Code source de DokuWiki 2006-11-06

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/inc/auth/ -> plain.class.php (sommaire)

Plaintext authentication backend

Author: Andreas Gohr <andi@splitbrain.org>
Author: Chris Smith <chris@jalakai.co.uk>
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
Poids: 319 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 1 fichier
 inc/auth/basic.class.php

Définit 1 class

auth_plain:: (11 méthodes):
  auth_plain()
  checkPass()
  getUserData()
  createUser()
  modifyUser()
  deleteUsers()
  getUserCount()
  retrieveUsers()
  _loadUserData()
  _filter()
  _constructPattern()


Classe: auth_plain  - X-Ref

auth_plain()   X-Ref
Constructor

Carry out sanity checks to ensure the object is
able to operate. Set capabilities.

author: Christopher Smith <chris@jalakai.co.uk>

checkPass($user,$pass)   X-Ref
Check user+password [required auth function]

Checks if the given user exists and the given
plaintext password is correct

author: Andreas Gohr <andi@splitbrain.org>
return: bool

getUserData($user)   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

author: Andreas Gohr <andi@splitbrain.org>

createUser($user,$pwd,$name,$mail,$grps=null)   X-Ref
Create a new User

Returns false if the user already exists, null when an error
occured and true if everything went well.

The new user will be added to the default group by this
function if grps are not specified (default behaviour).

author: Andreas Gohr <andi@splitbrain.org>
author: Chris Smith <chris@jalakai.co.uk>

modifyUser($user, $changes)   X-Ref
Modify user data

author: Chris Smith <chris@jalakai.co.uk>
param: $user      nick of the user to be changed
param: $changes   array of field/value pairs to be changed (password will be clear text)
return: bool

deleteUsers($users)   X-Ref
Remove one or more users from the list of registered users

author: Christopher Smith <chris@jalakai.co.uk>
param: array  $users   array of users to be deleted
return: int             the number of users deleted

getUserCount($filter=array()   X-Ref
Return a count of the number of user which meet $filter criteria

author: Chris Smith <chris@jalakai.co.uk>

retrieveUsers($start=0,$limit=0,$filter=array()   X-Ref
Bulk retrieval of user data

author: Chris Smith <chris@jalakai.co.uk>
param: start     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)

_loadUserData()   X-Ref
Load all user data

loads the user file into a datastructure

author: Andreas Gohr <andi@splitbrain.org>

_filter($user, $info)   X-Ref
return 1 if $user + $info match $filter criteria, 0 otherwise

author: Chris Smith <chris@jalakai.co.uk>

_constructPattern($filter)   X-Ref
Pas de description



Généré le : Tue Apr 3 20:47:31 2007 par Balluche grâce à PHPXref 0.7