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

Class: LiveUser_Perm_Simple

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

Class Overview


Base class for permission handling. Provides the simplest set of permission handling features.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Markus Wolff

Variables

Methods


Child classes:

LiveUser_Perm_Medium
Medium container for permission handling

Inherited Variables

Inherited Methods


Class Details

[line 64]
Base class for permission handling. Provides the simplest set of permission handling features.

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



[ Top ]


Class Variables

$perm_type =  LIVEUSER_ANONYMOUS_TYPE_ID

[line 104]

Defines the user type. Depending on the value the user can gain certain rights automatically
  • Access: public

Type:   int


[ Top ]

$perm_user_id =  ''

[line 72]

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

Type:   string


[ Top ]

$right_ids =  false

[line 84]

One-dimensional array containing current user's rights (direct and (sub)group).

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

Format: "RightId" => "Level"

  • Access: public

Type:   mixed


[ Top ]

$stack =  null

[line 112]

Error stack
  • Access: public

Type:   PEAR_ErrorStack


[ Top ]

$user_right_ids = array()

[line 95]

One-dimensional array containing only the individual rights directly assigned to the user.

Format: "RightId" => "Level"

  • Access: public

Type:   array


[ Top ]



Method Detail

LiveUser_Perm_Simple (Constructor)   [line 125]

LiveUser_Perm_Simple LiveUser_Perm_Simple( )

Class constructor. Feel free to override in backend subclasses.

[ Top ]

checkRight   [line 248]

int checkRight( int $right_id)

Checks if the current user has a certain right.

If the user is has an "area admin" type he will automatically be awarded the right.

  • Return: level at which the user has the given right or false if the user does not have the right.
  • Access: public

Parameters:

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

[ Top ]

disconnect   [line 325]

bool disconnect( )

Properly disconnect from resources.
  • Return: true on success and false on failure
  • Access: public

[ Top ]

freeze   [line 286]

array freeze( string $sessionName)

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

Parameters:

string   $sessionName   —  name of the session in use.

[ Top ]

getProperty   [line 269]

mixed getProperty( string $what)

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

Parameters:

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

[ Top ]

init   [line 138]

bool init( array &$conf)

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

Parameters:

array   &$conf   —  Array with the configuration

[ Top ]

mapUser   [line 177]

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

unfreeze   [line 307]

void unfreeze( string $sessionName, bool 1)

Reinitializes properties from the storage container.
  • Access: public

Parameters:

bool   1   —  always returns true
string   $sessionName   —  name of the key to use inside the session

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:40:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.