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

Class: LiveUser_Perm_Simple

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

Class Overview


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.


Author(s):

Version:

  • $Id: Simple.php,v 1.11 2004/12/18 21:51:39 lsmith Exp $

Variables

Methods


Child classes:

LiveUser_Perm_Medium
Medium permission complexity driver for LiveUser.

Inherited Variables

Inherited Methods


Class Details

[line 37]
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.
  • Author: Bjoern Kraus <krausbn@php.net>
  • Author: Markus Wolff <wolff@21st.de>
  • Version: $Id: Simple.php,v 1.11 2004/12/18 21:51:39 lsmith Exp $


[ Top ]


Class Variables

$permUserId =  ''

[line 44]

Unique user ID, used to identify users from the auth container.

Type:   string


[ Top ]

$rights =  false

[line 55]

One-dimensional array containing current user's rights.

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

Format: "RightId" => "Level"


Type:   mixed


[ Top ]

$userRights = array()

[line 65]

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

Format: "RightId" => "Level"


Type:   array


[ Top ]

$userType =  LIVEUSER_ANONYMOUS_TYPE_ID

[line 72]

Defines the user type.

Type:   integer


[ Top ]



Method Detail

LiveUser_Perm_Simple (Constructor)   [line 91]

LiveUser_Perm_Simple LiveUser_Perm_Simple( &$confArray)

Class constructor. Feel free to override in backend subclasses.

Parameters:

   &$confArray   — 

[ Top ]

checkRight   [line 183]

integer checkRight( integer $right_id, boolean $ondemand)

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.
boolean   $ondemand   —  allow ondemand reading of rights

[ Top ]

disconnect   [line 252]

void disconnect( )

properly disconnect from resources
  • Access: public

[ Top ]

freeze   [line 217]

array freeze( $sessionName)

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

Parameters:

   $sessionName   — 

[ Top ]

getProperty   [line 202]

mixed getProperty( string $what)

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

Parameters:

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

[ Top ]

init   [line 113]

boolean init( [string $authUserId = 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   $authUserId   —  user identifier
string   $containerName   —  name of the auth container

[ Top ]

readRights   [line 143]

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 161]

mixed readUserRights( int $permUserId)

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

Parameters:

int   $permUserId   — 

[ Top ]

unfreeze   [line 236]

void unfreeze( $sessionName, array $propertyValues)

Reinitializes properties
  • Access: public

Parameters:

array   $propertyValues   — 
   $sessionName   — 

[ Top ]


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