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

Class: LiveUser_Admin_Perm_Container_DB_Medium

Source Location: /LiveUser-0.11.0/Admin/Perm/Container/DB_Medium.php

Class Overview

LiveUser_Admin_Perm_Common
   |
   --LiveUser_Admin_Perm_Container_DB_Simple
      |
      --LiveUser_Admin_Perm_Container_DB_Medium

This is a PEAR::DB admin class for the LiveUser package.


Author(s):

Version:

  • $Id: DB_Medium.php,v 1.47 2004/04/23 14:04:35 lsmith Exp $

Methods


Child classes:

LiveUser_Admin_Perm_Container_DB_Complex
This is a PEAR::DB admin class for the LiveUser package.

Inherited Variables

Inherited Methods

Class: LiveUser_Admin_Perm_Container_DB_Simple

LiveUser_Admin_Perm_Container_DB_Simple::LiveUser_Admin_Perm_Container_DB_Simple()
Constructor
LiveUser_Admin_Perm_Container_DB_Simple::addApplication()
Add an application
LiveUser_Admin_Perm_Container_DB_Simple::addArea()
Add an area
LiveUser_Admin_Perm_Container_DB_Simple::addLanguage()
Add a new language
LiveUser_Admin_Perm_Container_DB_Simple::addRight()
Add a right in special area
LiveUser_Admin_Perm_Container_DB_Simple::addTranslation()
Assigns name (and description) in specified language to a section
LiveUser_Admin_Perm_Container_DB_Simple::addUser()
Add a user
LiveUser_Admin_Perm_Container_DB_Simple::addUserAreaAdmin()
Make a user an admin of a given area.
LiveUser_Admin_Perm_Container_DB_Simple::getApplications()
Get list of all applications
LiveUser_Admin_Perm_Container_DB_Simple::getAreas()
Get list of all areas within a given application
LiveUser_Admin_Perm_Container_DB_Simple::getAuthUserId()
Gets the auth ID of a user.
LiveUser_Admin_Perm_Container_DB_Simple::getCurrentApplication()
Get current application
LiveUser_Admin_Perm_Container_DB_Simple::getCurrentLanguage()
Get current language
LiveUser_Admin_Perm_Container_DB_Simple::getLanguages()
Get list of all languages
LiveUser_Admin_Perm_Container_DB_Simple::getPermUserId()
Gets the perm ID of a user.
LiveUser_Admin_Perm_Container_DB_Simple::getRights()
Get list of all rights
LiveUser_Admin_Perm_Container_DB_Simple::getTranslation()
Get name (and description) of the [section] in specified language
LiveUser_Admin_Perm_Container_DB_Simple::getUsers()
Fetch users from the database.
LiveUser_Admin_Perm_Container_DB_Simple::grantUserRight()
Grant right to user
LiveUser_Admin_Perm_Container_DB_Simple::removeApplication()
Delete an application
LiveUser_Admin_Perm_Container_DB_Simple::removeArea()
Delete an area
LiveUser_Admin_Perm_Container_DB_Simple::removeLanguage()
Remove a language
LiveUser_Admin_Perm_Container_DB_Simple::removeRight()
Delete a right
LiveUser_Admin_Perm_Container_DB_Simple::removeTranslation()
Remove name (and description) of the [section] in specified language
LiveUser_Admin_Perm_Container_DB_Simple::removeUser()
Delete user
LiveUser_Admin_Perm_Container_DB_Simple::removeUserAreaAdmin()
Remove the privilege of being an admin.
LiveUser_Admin_Perm_Container_DB_Simple::revokeUserRight()
Revoke right from user
LiveUser_Admin_Perm_Container_DB_Simple::setCurrentApplication()
Set current application
LiveUser_Admin_Perm_Container_DB_Simple::setCurrentLanguage()
Set current language
LiveUser_Admin_Perm_Container_DB_Simple::updateApplication()
Update an application
LiveUser_Admin_Perm_Container_DB_Simple::updateArea()
Update an area
LiveUser_Admin_Perm_Container_DB_Simple::updateAuthUserId()
Updates auth_user_id in the mapping table.
LiveUser_Admin_Perm_Container_DB_Simple::updateLanguage()
Update language
LiveUser_Admin_Perm_Container_DB_Simple::updateRight()
Update a right
LiveUser_Admin_Perm_Container_DB_Simple::updateTranslation()
Updates name (and description) of [section] in specified language
LiveUser_Admin_Perm_Container_DB_Simple::updateUserRight()
Update right level of userRight

Class: LiveUser_Admin_Perm_Common

LiveUser_Admin_Perm_Common::LiveUser_Admin_Perm_Common()
Class constructor. Feel free to override in backend subclasses.
LiveUser_Admin_Perm_Common::addRights()
Adds rights for a single user.
LiveUser_Admin_Perm_Common::addUser()
Adds a new user to Perm.
LiveUser_Admin_Perm_Common::getAuthUserId()
Gets the auth ID of a user.
LiveUser_Admin_Perm_Common::getPermUserId()
Gets the perm ID of a user.
LiveUser_Admin_Perm_Common::getProperty()
Function returns the inquired value if it exists in the class.
LiveUser_Admin_Perm_Common::getUsers()
Gets all perm_user_id, type, container and rights
LiveUser_Admin_Perm_Common::outputRightsConstants()
Generate the constants to a file or define them directly.
LiveUser_Admin_Perm_Common::removeRights()
Removes rights for a single user.
LiveUser_Admin_Perm_Common::removeUser()
Removes an existing user from Perm.
LiveUser_Admin_Perm_Common::setUserType()
Updates user type.
LiveUser_Admin_Perm_Common::updateRights()
Shortcut to delete all existing rights of a user and add the given.

Class Details

[line 52]
This is a PEAR::DB admin class for the LiveUser package.

It takes care of managing the permission part of the package.

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:

  • Files "common.php", "Container/DB_Medium.php" in directory "Perm"
  • Array of connection options must be passed to the constructor. Example: array("server" => "localhost", "user" => "root", "password" => "pwd", "database" => "AllMyPreciousData")



[ Top ]


Method Detail

LiveUser_Admin_Perm_Container_DB_Medium (Constructor)   [line 61]

void LiveUser_Admin_Perm_Container_DB_Medium( array &$connectOptions)

Constructor
  • Access: protected

Parameters:

array   &$connectOptions   —  full liveuser conf array

[ Top ]

activateGroup   [line 260]

mixed activateGroup( integer $group_id)

Activate group
  • Return: boolean or DB Error object or false
  • Access: public

Parameters:

integer   $group_id   —  id of group

[ Top ]

addGroup   [line 76]

mixed addGroup( string $group_name, [boolean $group_description = null], [boolean $active = false], [array $customFields = array()])

Add a group to the database
  • Return: integer (group_id) or DB Error object
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Perm_Container_DB_Complex::addGroup()
Add a group to the database

Parameters:

string   $group_name   —  name of group
boolean   $group_description   —  description of group
boolean   $active   —  activate group?
array   $customFields   —  Array of custom fields to be added

[ Top ]

addUserToGroup   [line 418]

mixed addUserToGroup( string $permId, integer $group_id)

Add User to Group
  • Return: boolean or DB Error object or false if user already belongs to the group
  • Access: public

Parameters:

string   $permId   —  id of user
integer   $group_id   —  id of group

[ Top ]

deactivateGroup   [line 289]

mixed deactivateGroup( integer $group_id)

Deactivate group
  • Return: boolean or DB Error object
  • Access: public

Parameters:

integer   $group_id   —  id of group

[ Top ]

getGroups   [line 493]

mixed getGroups( [array $options = null], [ $addCustomFields = array()])

Get list of all groups

This method accepts the following options... 'where_user_id' = [PERM_USER_ID], 'where_group_id' = [GROUP_ID], 'where_is_active' = [BOOLEAN], 'with_rights' = [BOOLEAN]

  • Return: array or DB Error object
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Perm_Container_DB_Complex::getGroups()
Get list of all groups

Parameters:

array   $options   —  an array determining which fields and conditions to use
   $addCustomFields   — 

[ Top ]

grantGroupRight   [line 315]

mixed grantGroupRight( integer $group_id, integer $right_id)

Grant right to group
  • Return: boolean or DB Error object
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Perm_Container_DB_Complex::grantGroupRight()
Grant right to group

Parameters:

integer   $group_id   —  id of group
integer   $right_id   —  id of right

[ Top ]

removeGroup   [line 139]

mixed removeGroup( integer $group_id)

Deletes a group from the database
  • Return: boolean or DB Error object
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Perm_Container_DB_Complex::removeGroup()
Deletes a group from the database

Parameters:

integer   $group_id   —  id of deleted group

[ Top ]

removeUserFromGroup   [line 460]

mixed removeUserFromGroup( string $permId, [integer $group_id = null])

Remove User from Group
  • Return: boolean or DB Error object
  • Access: public

Parameters:

string   $permId   —  id of user
integer   $group_id   —  id of group

[ Top ]

revokeGroupRight   [line 359]

mixed revokeGroupRight( integer $group_id, [integer $right_id = null])

Revoke right from group
  • Return: boolean or DB Error object
  • Access: public

Parameters:

integer   $group_id   —  id of group
integer   $right_id   —  id of right

[ Top ]

updateGroup   [line 199]

mixed updateGroup( integer $group_id, string $group_name, [string $group_description = null], [boolean $active = null], [boolean $customFields = array()], array 5)

Update group
  • Return: boolean or DB Error object
  • Access: public

Overridden in child classes as:

LiveUser_Admin_Perm_Container_DB_Complex::updateGroup()
Update group

Parameters:

array   5   —  Array of custom fields to be updated.
integer   $group_id   —  id of group
string   $group_name   —  name of group constant
string   $group_description   —  name of group
boolean   $active   —  description of group
boolean   $customFields   —  activate group?

[ Top ]

updateGroupRight   [line 389]

mixed updateGroupRight( integer $group_id, integer $right_id, integer $right_level)

Update right level of groupRight
  • Return: boolean or DB Error object
  • Access: public

Parameters:

integer   $group_id   —  id of group
integer   $right_id   —  id of right
integer   $right_level   —  right level

[ Top ]


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