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

Class: LiveUser_Admin

Source Location: /LiveUser_Admin-0.4.0/Admin.php

Class Overview


A unified admin class


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Markus Wolff

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 109]
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



[ Top ]

$authContainerName =

[line 117]

Name of the current selected auth container
  • Access: public

Type:   string


[ Top ]

$log =  null

[line 180]

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

Type:   Log


[ Top ]

$perm =  null

[line 133]

Admin perm object
  • Access: public



[ Top ]



Method Detail

LiveUser_Admin (Constructor)   [line 191]

LiveUser_Admin LiveUser_Admin( bool|log &$debug)


Parameters:

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

[ Top ]

addUser   [line 408]

int|bool addUser( array $data)

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

Parameters:

array   $data   —  auth user data and perm type

[ Top ]

factory   [line 214]

LiveUser_Admin|bool &factory( array &$conf)


Parameters:

array   &$conf   —  configuration array

[ Top ]

getErrors   [line 677]

array getErrors( )

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

[ Top ]

getUsers   [line 551]

array|bool getUsers( [array $params = array()])

Finds and gets full userinfo by filtering inside the given container

Note that this method is not particularily efficient, as it fetches the data in the primary container in a single call, but requires one call to the secondary container for every user returned from the primary container

  • Return: array with userinfo if found on success or false otherwise
  • Access: public

Parameters:

array   $params   —  params (as for getUsers() with an additional optional key 'container' 'perm' (default) or

[ Top ]

init   [line 343]

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 502]

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 267]

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 308]

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 238]

LiveUser_Admin|bool &singleton( array &$conf)


Parameters:

array   &$conf   —  configuration array

[ Top ]

updateUser   [line 445]

int|bool updateUser( array $data, int $permUserId)

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

Parameters:

array   $data   —  auth user data and perm type
int   $permUserId   —  permission user id

[ Top ]


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