LiveUser
[ class tree: LiveUser ] [ index: LiveUser ] [ all elements ]

Class: LiveUser_Perm_Simple

Source Location: /LiveUser-0.16.5/Perm/Simple.php

Class Overview


Base class for permission handling


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2005 Markus Wolff

Variables

Methods


Child classes:

LiveUser_Perm_Medium
Medium container for permission handling

Inherited Variables

Inherited Methods


Class Details

[line 63]
Base class for permission handling

This class provides a set of functions for implementing a user permission management system on live websites. All authorisation backends/containers must be extensions of this base class.



[ Top ]


Class Variables

$perm_type =  LIVEUSER_ANONYMOUS_TYPE_ID

[line 102]

Defines the user type.
  • Access: public

Type:   integer


[ Top ]

$perm_user_id =  ''

[line 71]

Unique user ID, used to identify users from the auth container.
  • Access: public

Type:   string


[ Top ]

$rights =  false

[line 83]

One-dimensional array containing current user's rights.

This already includes grouprights and possible overrides by individual right settings.

Format: "RightId" => "Level"

  • Access: public

Type:   mixed


[ Top ]

$user_rights = array()

[line 94]

One-dimensional array containing only the individual rights for the actual user.

Format: "RightId" => "Level"

  • Access: public

Type:   array


[ Top ]

$_stack =  null

[line 110]

Error stack
  • Access: public

Type:   PEAR_ErrorStack


[ Top ]

$_storage =  null

[line 118]

Storage Container
  • Access: public

Type:   object


[ Top ]



Method Detail

LiveUser_Perm_Simple (Constructor)   [line 123]

LiveUser_Perm_Simple LiveUser_Perm_Simple( )

Class constructor. Feel free to override in backend subclasses.

[ Top ]

checkRight   [line 244]

integer checkRight( integer $right_id)

Checks if the current user has a certain right in a given area.

If $this->ondemand and $ondemand is true, the rights will be loaded on the fly.

  • Return: Level of the right.
  • Access: public

Parameters:

integer   $right_id   —  Id of the right to check for.

[ Top ]

disconnect   [line 321]

void disconnect( )

properly disconnect from resources
  • Access: public

[ Top ]

freeze   [line 282]

array freeze( string $sessionName)

store all properties in an array
  • Return: containing the property values
  • Access: public

Parameters:

string   $sessionName   —  name of the session in use.

[ Top ]

getProperty   [line 265]

mixed getProperty( string $what)

Function returns the inquired value if it exists in the class.
  • Return: null, a value or an array.
  • Access: public

Parameters:

string   $what   —  Name of the property to be returned.

[ Top ]

init   [line 136]

boolean init( mixed &$conf)

Load the storage container
  • Return: true on success or false on failure
  • Access: public

Parameters:

mixed   &$conf   —  Name of array containing the configuration.

[ Top ]

mapUser   [line 173]

boolean mapUser( [string $auth_user_id = null], [string $containerName = null])

Tries to find the user with the given user ID in the permissions container. Will read all permission data and return true on success.
  • Return: true on success or false on failure
  • Access: public

Parameters:

string   $auth_user_id   —  user identifier
string   $containerName   —  name of the auth container

[ Top ]

readRights   [line 203]

mixed readRights( )

Reads all rights of current user into a two-dimensional associative array, having the area names as the key of the 1st dimension.

Group rights and invididual rights are being merged in the process.

  • Return: array or false on failure
  • Access: public

[ Top ]

readUserRights   [line 222]

mixed readUserRights( int $perm_user_id)

  • Return: array or false on failure
  • Access: public

Parameters:

int   $perm_user_id   — 

[ Top ]

unfreeze   [line 303]

void unfreeze( array $sessionName, boolean 1)

Reinitializes properties
  • Access: public

Parameters:

array   $sessionName   —  name of the session in use.
boolean   1   —  always returns true

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.