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

Class: LiveUser_Admin

Source Location: /LiveUser_Admin-0.3.5/Admin.php

Class Overview


Attempt at 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]
Attempt at 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 141]

Auth admin object
  • Access: public

Type:   object


[ Top ]

$authContainerName =

[line 117]

Name of the current selected auth container
  • Access: public

Type:   string


[ Top ]

$log =  null

[line 174]

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

Type:   Log


[ Top ]

$perm =  null

[line 133]

Admin perm object
  • Access: public

Type:   object


[ Top ]



Method Detail

LiveUser_Admin (Constructor)   [line 176]

LiveUser_Admin LiveUser_Admin( $debug)


Parameters:

   $debug   — 

[ Top ]

addUser   [line 388]

mixed addUser( string $data, [integer $type = LIVEUSER_USER_TYPE_ID])

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

Parameters:

string   $data   —  authentication user data
integer   $type   —  permission user type

[ Top ]

factory   [line 196]

object &factory( &$conf, array $conf)


Parameters:

array   $conf   —  configuration array
   &$conf   — 

[ Top ]

getErrors   [line 631]

array getErrors( )

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

[ Top ]

getUsers   [line 510]

mixed getUsers( [mixed $container = 'perm'], [boolean $filter = array()], [ $first = false])

Finds and gets full userinfo by filtering inside the given container
  • Return: Array with userinfo if found else error object
  • Access: public

Parameters:

mixed   $container   —  perm filters (as for getUsers() from the perm container
boolean   $filter   —  if only one row should be returned
   $first   — 

[ Top ]

removeUser   [line 468]

mixed removeUser( mixed $permUserId)

Removes user from both Perm and Auth containers
  • Return: error object or true
  • Access: public

Parameters:

mixed   $permUserId   —  Perm ID

[ Top ]

setAdminAuthContainer   [line 249]

boolean &setAdminAuthContainer( string $authName)

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

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

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

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

Parameters:

string   $authName   —  auth container name

[ Top ]

setAdminContainers   [line 323]

boolean setAdminContainers( [mixed $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->updateAuthUserId();

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

Parameters:

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

[ Top ]

setAdminPermContainer   [line 291]

boolean &setAdminPermContainer( )

Sets the perm container

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

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

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

[ Top ]

singleton   [line 220]

object &singleton( &$conf, array $conf)


Parameters:

array   $conf   —  configuration array
   &$conf   — 

[ Top ]

updateUser   [line 419]

mixed updateUser( integer $permUserId, string $data, [integer $type = null])

Changes user data for both containers.
  • Return: error object or true
  • Access: public

Parameters:

integer   $permUserId   —  permission user id
string   $data   —  authentication user data
integer   $type   —  permission user type

[ Top ]


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