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

Class: LiveUser_Perm_Container_DB_Complex

Source Location: /LiveUser-0.11.1/Perm/Container/DB_Complex.php

Class Overview

LiveUser_Perm_Common
   |
   --LiveUser_Perm_Container_DB_Simple
      |
      --LiveUser_Perm_Container_DB_Medium
         |
         --LiveUser_Perm_Container_DB_Complex

Class LiveUser_Perm_Container_DB_Complex


Author(s):

Version:

  • $Id: DB_Complex.php,v 1.47 2004/04/21 09:54:43 lsmith Exp $

Methods


Inherited Variables

Inherited Methods

Class: LiveUser_Perm_Container_DB_Medium

LiveUser_Perm_Container_DB_Medium::LiveUser_Perm_Container_DB_Medium()
Constructor
LiveUser_Perm_Container_DB_Medium::init()
Tries to find the user with the given user ID in the permissions container. Will read all permission data and return true on success.
LiveUser_Perm_Container_DB_Medium::readGroupRights()
Reads the group rights and put them in the array
LiveUser_Perm_Container_DB_Medium::readUserRights()
Reads the user rights and put them in an array

Class: LiveUser_Perm_Container_DB_Simple

LiveUser_Perm_Container_DB_Simple::LiveUser_Perm_Container_DB_Simple()
Constructor
LiveUser_Perm_Container_DB_Simple::disconnect()
properly disconnect from resources
LiveUser_Perm_Container_DB_Simple::init()
Tries to find the user with the given user ID in the permissions container. Will read all permission data and return true on success.
LiveUser_Perm_Container_DB_Simple::readRights()
Reads all rights of current user into an associative array.
LiveUser_Perm_Container_DB_Simple::userExists()
LiveUser_Perm_Container_DB_Complex::userExists()

Class: LiveUser_Perm_Common

LiveUser_Perm_Common::LiveUser_Perm_Common()
Class constructor. Feel free to override in backend subclasses.
LiveUser_Perm_Common::checkLevel()
Checks if the current user has a certain right in a given area at the necessary level.
LiveUser_Perm_Common::checkRight()
Checks if the current user has a certain right in a given area.
LiveUser_Perm_Common::checkRightLevel()
Checks if the current user has a certain right in a given area with the sufficient level to gain access to a specific ressource in that area.
LiveUser_Perm_Common::disconnect()
properly disconnect from resources
LiveUser_Perm_Common::freeze()
store all properties in an array
LiveUser_Perm_Common::getProperty()
Function returns the inquired value if it exists in the class.
LiveUser_Perm_Common::getRights()
Returns a one-dimensional array with all rights assigned
LiveUser_Perm_Common::init()
Tries to find the user with the given user ID in the permissions container. Will read all permission data and return true on success.
LiveUser_Perm_Common::readGroupRights()
Reads all individual rights of current user into a two-dimensional array of this format: "GroupName" => "AreaName" -> "RightName"
LiveUser_Perm_Common::readRights()
Reads all rights of current user into a two-dimensional associative array, having the area names as the key of the 1st dimension.
LiveUser_Perm_Common::readUserRights()
Reads all individual rights of current user into a two-dimensional array of this format: AreaName => RightName -> Value
LiveUser_Perm_Common::unfreeze()
Reinitializes properties
LiveUser_Perm_Common::userExists()
Checks if a user with the given perm_user_id exists in the permission container and returns true on success.

Class Details

[line 53]
Class LiveUser_Perm_Container_DB_Complex

Description: This is a PEAR::DB backend driver for the LiveUser class. A PEAR::DB connection object can be passed to the constructor to reuse an existing connection. Alternatively, a DSN can be passed to open a new one.

Requirements:

  • File "Liveuser.php" (contains the parent class "LiveUser")
  • Array of connection options or a PEAR::DB connection object must be passed to the constructor. Example: array('dsn' => 'mysql://user:pass@host/db_name') OR &$conn (PEAR::DB connection object)



[ Top ]


Method Detail

LiveUser_Perm_Container_DB_Complex (Constructor)   [line 61]

void &LiveUser_Perm_Container_DB_Complex( &$connectOptions, mixed $connectOptions)

Constructor

Parameters:

mixed   $connectOptions   —  Array or PEAR::DB object.
   &$connectOptions   — 

[ Top ]

checkRightLevel   [line 312]

boolean checkRightLevel( integer $right_id, mixed $owner_user_id, mixed $owner_group_id)

LiveUser_Perm_Container_DB_Complex::checkRightLevel()

Checks if the current user has a certain right with the sufficient level to gain access to a specific ressource in that area.


Overrides LiveUser_Perm_Common::checkRightLevel() (Checks if the current user has a certain right in a given area with the sufficient level to gain access to a specific ressource in that area.)

Parameters:

mixed   $owner_user_id   —  Id or array of Ids of the owner of the
mixed   $owner_group_id   —  Id or array of Ids of the group of the ressource for which the right is requested.
integer   $right_id   —  Id of the right to check for.

[ Top ]


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