blueshoes php application framework and cms            core_auth
[ class tree: core_auth ] [ index: core_auth ] [ all elements ]

Class: Bs_UserManagement

Source Location: /core/auth/Bs_UserManagement.class.php

Class Overview

Bs_Object
   |
   --Bs_UserManagement

User and Group Management. EXPERIMENTAL!


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:37 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 74]
User and Group Management. EXPERIMENTAL!

USERS: +------------+----------+------------+ | USERNAME | PASSWORD | WHATEVER | +------------+----------+------------+ | sam | foo | other data | | andrej | bar | other data | +------------+----------+------------+

ITEMS: +------------+------------+ | ITEM | WHATEVER | +------------+------------+ | c:\ | other data | | d:\ | other data | +------------+------------+

PERMISSIONS: +------------+------------+ | PERM | WHATEVER | +------------+------------+ | read | other data | | write | other data | +------------+------------+

RELATIONS: +------------+---------+------------+ | USER/GROUP | ITEM | PERMISSION | +------------+---------+------------+ | sam | c:\ | read | +------------+---------+------------+

options: +---------------------+-------------------------------+-----------------------+ | what | easy | advanced | +---------------------+-------------------------------+-----------------------+ | group-user relation | 1:n | n:n | | who has rights | group onyl | user and group | | where are rights | flags in the user/group table | in a relational table | | username is unique | over all | per group | +---------------------+-------------------------------+-----------------------+

NOTE:

  • if there is a username written in one case, there may not be another one written in different case. example: if there is "tom", there may not be a "Tom". this definition is used everywhere, and cannot be changed. it would only lead to problems.

dependencies:




Tags:

pattern:  singleton: (pseudostatic)
status:  experimental
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:37 $
copyright:  blueshoes.org
author:  andrej arn <at blueshoes dot org>


[ Top ]


Class Variables

$appName =

[line 90]


Type:   mixed


[ Top ]

$formRecoverPasswordByUsername =

[line 106]



Tags:

see:  $this->_loadRecoverPasswordByUsernameForm
access:  public

Type:   object


[ Top ]

$objP =

[line 81]

object persister


Type:   object


[ Top ]

$_formRecoverPasswordByUsername =

[line 84]


Type:   mixed


[ Top ]

$_formSignup =

[line 87]


Type:   mixed


[ Top ]

$_groups =

[line 95]


Type:   mixed


[ Top ]

$_items =

[line 98]


Type:   mixed


[ Top ]

$_permissions =

[line 97]


Type:   mixed


[ Top ]

$_relations =

[line 99]


Type:   mixed


[ Top ]

$_users =

[line 94]


Type:   mixed


[ Top ]



Class Methods


constructor Bs_UserManagement [line 114]

Bs_UserManagement Bs_UserManagement( )

constructor



[ Top ]

method getAllUsers [line 189]

array &getAllUsers( [mixed $load = TRUE])



Tags:

throws:  bool FALSE


[ Top ]

method getUser [line 178]

object &getUser( string $username)

returns a reference to an instance of Bs_User for the given username.

loads the user first if that has not been done before.

example: $user =& $userManag->getUser('tom');




Tags:

see:  $this->loadUserByUsername()
throws:  bool FALSE (no such user)
access:  public


Parameters:

string   $username  

[ Top ]

method initObjPersister [line 293]

bool initObjPersister( mixed $objP, object &$objP)



Tags:

return:  TRUE on success; FALSE on error (see getLastError()).
access:  public


Parameters:

object   &$objP  

[ Top ]

method loadAllUsers [line 132]

bool loadAllUsers( )

loads all existing users. yep.



Tags:

access:  public


[ Top ]

method loadGroup [line 232]

void loadGroup( [mixed $withUsers = TRUE])



[ Top ]

method loadItems [line 240]

void loadItems( )



[ Top ]

method loadPermissions [line 236]

void loadPermissions( )



[ Top ]

method loadRelations [line 243]

void loadRelations( )



[ Top ]

method loadUserByUsername [line 152]

bool loadUserByUsername( string $username)

loads the user specified.



Tags:

return:  TRUE on success; FALSE on error (see getLastError()).
see:  $this->getUser()
access:  public


Parameters:

string   $username  

[ Top ]

method loadUsersAndGroups [line 122]

void loadUsersAndGroups( )



[ Top ]

method setUser [line 205]

bool setUser( obj &$userObj)

adds the given user object.

returns FALSE if the given userObj has no username set.




Tags:

return:  (TRUE on success, FALSE on failure.)
access:  public


Parameters:

obj   &$userObj   (instance of Bs_User)

[ Top ]

method storeUser [line 217]

bool storeUser( mixed $user)

stores the user specified.



Tags:

return:  TRUE on success; FALSE on error (see getLastError()).
access:  public


Parameters:

mixed   $user   (string username, or object instance of Bs_User)

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:13:20 +0100 by phpDocumentor 1.2.3