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

Class: LiveUser_Perm_Container_MDB2_Simple

Source Location: /LiveUser-0.13.0/Perm/Container/MDB2/Simple.php

Class Overview

LiveUser_Perm_Common
   |
   --LiveUser_Perm_Container_MDB2_Simple

Simple MDB2-based complexity driver for LiveUser.


Author(s):

Version:

  • $Id: Simple.php,v 1.2 2004/09/18 19:07:46 dufuz Exp $

Variables

Methods


Child classes:

LiveUser_Perm_Container_MDB2_Medium
Medium MDB2-based complexity driver for LiveUser.

Inherited Variables

Inherited Methods

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::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 45]
Simple MDB2-based complexity driver for LiveUser.

Description: The MDB2_Simple provides the following functionalities

  • users
  • userrights

  • Author: krausbn@php.net>
  • Version: $Id: Simple.php,v 1.2 2004/09/18 19:07:46 dufuz Exp $


[ Top ]


Class Variables

$groupTableCols = array(
        'required' => array(
            'group_id' => array('type' => 'integer', 'name' => 'group_id'),'group_define_name'=>array('type'=>'text','name'=>'group_define_name')),'optional'=>array('group_type'=>array('type'=>'integer','name'=>'group_type'),'is_active'=>array('type'=>'boolean','name'=>'is_active'),'owner_user_id'=>array('type'=>'integer','name'=>'owner_user_id'),'owner_group_id'=>array('type'=>'integer','name'=>'owner_group_id')))

[line 103]

Columns of the perm table.

Associative array with the names of the perm table columns. The 'group_id' and 'group_define_name' fields have to be set. 'group_type', 'is_active', 'owner_user_id' and 'owner_group_id' are optional. It doesn't make sense to set only one of the time columns without the other.

The type attribute is only useful when using MDB or MDB2.

  • Access: public

Type:   array


[ Top ]

$init_ok =  false

[line 88]

Indicates if backend module initialized correctly. If yes,

true, if not false. Backend module won't initialize if the init value (usually an object or resource handle that identifies the backend to be used) is not of the required type.

  • Access: public

Type:   boolean


[ Top ]

$prefix =  'liveuser_'

[line 76]

Table prefix Prefix for all db tables the container has.
  • Access: public

Type:   string


[ Top ]



Method Detail

LiveUser_Perm_Container_MDB2_Simple (Constructor)   [line 123]

void LiveUser_Perm_Container_MDB2_Simple( mixed &$connectOptions)

Constructor
  • Access: protected

Parameters:

mixed   &$connectOptions   —  configuration array

[ Top ]

disconnect   [line 200]

void disconnect( )

properly disconnect from resources
  • Access: public

Overrides LiveUser_Perm_Common::disconnect() (properly disconnect from resources)
[ Top ]

init   [line 168]

boolean init( string $uid)

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

Overrides 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.)

Parameters:

string   $uid   —  user identifier

[ Top ]

readRights   [line 247]

void readRights( )

Reads all rights of current user into an associative array.

Right => 1

  • Access: public

Overrides 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.)
[ Top ]

userExists   [line 216]

boolean userExists( integer $user_id)

Checks if a user with the given perm_user_id exists in the permission container and returns true on success.
  • Return: true if the id was found, else false.
  • Access: public

Overrides LiveUser_Perm_Common::userExists() (Checks if a user with the given perm_user_id exists in the permission container and returns true on success.)

Parameters:

integer   $user_id   —  The users id in the permission table.

[ Top ]


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