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

Class: LiveUser_Admin

Source Location: /LiveUser_Admin-0.3.7/Admin.php

Class Overview


A unified admin class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2005 Markus Wolff

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 108]
A unified admin class

Simple usage:

  1.  $admin LiveUser_Admin::factory($conf);
  2.  $filters = array(
  3.      'perm_user_id' => '3'
  4.  );
  5.  $found $admin->getUsers($filters);
  6.  
  7.  if ($found{
  8.   var_dump($admin->perm->getRights());
  9.  }



[ Top ]


Class Variables

$auth =  null

[line 140]

Auth admin object
  • Access: public



[ Top ]

$authContainerName =

[line 116]

Name of the current selected auth container
  • Access: public

Type:   string


[ Top ]

$log =  null

[line 171]

PEAR::Log object used for error logging by ErrorStack
  • Access: public

Type:   Log


[ Top ]

$perm =  null

[line 132]

Admin perm object
  • Access: public



[ Top ]



Method Detail

LiveUser_Admin (Constructor)   [line 182]

LiveUser_Admin LiveUser_Admin( bool|log $debug)


Parameters:

bool|log   $debug   —  boolean value to denote if the debug mode should be

[ Top ]

addUser   [line 398]

int|bool addUser( array $data, [int $type = LIVEUSER_USER_TYPE_ID])

Add a user to both containers.
  • Return: perm user id or false
  • Access: public

Parameters:

array   $data   —  authentication user data
int   $type   —  permission user type

[ Top ]

factory   [line 202]

LiveUser_Admin|bool &factory( array &$conf)


Parameters:

array   &$conf   —  configuration array

[ Top ]

getErrors   [line 645]

array getErrors( )

Wrapper method to get the Error Stack
  • Return: an array of the errors
  • Access: public

[ Top ]

getUsers   [line 522]

array|bool getUsers( [string $container = 'perm'], [array $param = array()])

Finds and gets full userinfo by filtering inside the given container
  • Return: array with userinfo if found on success or false otherwise
  • Access: public

Parameters:

string   $container   —  either 'auth' or 'perm' to determine if users should first be searched in the 'auth' or 'perm' container
array   $param   —  params (as for getUsers()

[ Top ]

init   [line 331]

bool init( [int $authUserId = null], [string $authName = null])

Setup backend container.

Upon success it will return true. You can then access the backend container by using the auth and perm properties of this class.

e.g.: $admin->perm->getUsers();

  • Return: true upon success, false otherwise
  • Access: public

Parameters:

int   $authUserId   —  user auth id
string   $authName   —  auth container name

[ Top ]

removeUser   [line 478]

int|bool removeUser( int $permUserId)

Removes user from both Perm and Auth containers
  • Return: affected rows on success or false otherwise
  • Access: public

Parameters:

int   $permUserId   —  Perm ID

[ Top ]

setAdminAuthContainer   [line 255]

LiveUser_Admin_Auth_Common|bool &setAdminAuthContainer( string $authName)

Sets the current auth container to the one with the given auth container name

Upon success it will return the auth instance. You can then access the auth backend container by using the auth property of this class or the auth object directly

e.g.: $admin->auth->addUser(); or $auth->addUser();

  • Return: auth instance upon success, false otherwise
  • Access: public

Parameters:

string   $authName   —  auth container name

[ Top ]

setAdminPermContainer   [line 296]

LiveUser_Admin_Perm_Simple|bool &setAdminPermContainer( )

Sets the perm container

Upon success it will return a perm instance. You can then access the perm backend container by using the perm properties of this class or the perm object directly.

e.g.: $admin->perm->addUser(); or $perm->addUser();

  • Return: auth instance upon success, false otherwise
  • Access: public

[ Top ]

singleton   [line 226]

LiveUser_Admin|bool &singleton( array &$conf)


Parameters:

array   &$conf   —  configuration array

[ Top ]

updateUser   [line 429]

int|bool updateUser( int $permUserId, array $data, [int $type = null])

Changes user data for both containers.
  • Return: affected rows on success or false otherwise
  • Access: public

Parameters:

int   $permUserId   —  permission user id
array   $data   —  authentication user data
int   $type   —  permission user type

[ Top ]


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