Class RSDLiveUserApplication

Description

RSDLiveUserApplication is the base class for any LiveUser application class.

It holds handles to all objects used in this application. It can be used as the only entry point to the whole application!

  • copyright: Lukas Feiler 2003
  • author: Lukas Feiler

Located in /code/framework/RSDEngine/RSDLiveUserApplication.php (line 40)

PEAR
   |
   --RSDApplication
      |
      --RSDLiveUserApplication
Variable Summary
Method Summary
mixed addLiveUserArea (string $applicationId, string $defineName, string $areaName, [array $areaAdmins = array()], [string $areaComment = null])
mixed addLiveUserAreaAdmin (int $userId, int $areaId)
void addLiveUserGroup (string $groupName, [array $users = array()], [mixed $groupComment = null], [boolean $active = true], integer $ownerUser, integer $ownerGroup, string $defineName, boolean $groupComent)
mixed addLiveUserRight (integer $areaId, string $defineName, string $rightName, [array $users = array()], [array $groups = array()], [string $rightComment = null], [boolean $hasImplied = false], [boolean $hasLevel = false], [boolean $hasScope = false])
True addLiveUserUser (mixed $username, mixed $password, mixed $activated, [mixed $userTypeId = LIVEUSER_USER_TYPE_ID])
void addLiveUserUserToGroup (mixed $userId, mixed $groupId)
mixed &callLiveUserAuthAdminMethod (String $methodName, [Array $args = array()])
mixed &callLiveUserPermAdminMethod (String $methodName, [Array $args = array()])
void countLiveUserAreaAdminsByAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
void countLiveUserGroupsByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
void countLiveUserUsersByGroupId (mixed $groupId, [mixed $whereActive = true], [mixed $config = false])
void countLiveUserUsersByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
void getAuthUserId ()
void getLiveUserAreaAdminsByAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
void getLiveUserAreaAdminsByNegativeAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false])
void getLiveUserAreaById (mixed $areaId, [mixed $config = false])
void getLiveUserGroupById (mixed $groupId, [mixed $config = false])
void getLiveUserGroupsByNegativeRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
void getLiveUserGroupsByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
void getLiveUserUsersByGroupid (mixed $groupId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
void getLiveUserUsersByNegativeGroupId (mixed $groupId, [mixed $whereActive = true], [mixed $config = false])
void getLiveUserUsersByNegativeRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
void getLiveUserUsersByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
void getUserId ()
void grantLiveUserGroupRight (mixed $groupId, mixed $rightId, [mixed $levelId = 1])
void grantLiveUserUserRight (mixed $userId, mixed $rightId, [mixed $levelId = 1])
void isAdmin ()
void isInGroup (mixed $groupId)
void isLiveUserAreaAdmin (int $areaId, [mixed $config = false])
mixed removeLiveUserAreaAdmin (int $userId, int $areaId, [mixed $preventAdminSucide = true])
True removeLiveUserUser (mixed $permId)
void removeLiveUserUserFromGroup (mixed $userId, mixed $groupId, [mixed $preventAdminSucide = true])
void revokeLiveUserGroupRight (mixed $groupId, mixed $rightId, [mixed $preventAdminSucide = true])
void revokeLiveUserUserRight (mixed $userId, mixed $rightId, [mixed $preventAdminSucide = true])
void setLiveUserOptions (Array $options)
void userIsInGroup (mixed $userId, mixed $groupId, [mixed $config = false])
Variables
LiveUser $liveUser = null (line 45)

An instance of PEAR::LiveUser.

mixed $_liveUserAuthAdmin = null (line 55)

An instance of one of the LiveUser auth admin classes.

array $_liveUserOptions = null (line 60)

An multidimensional array of configuration options.

mixed $_liveUserPermAdmin = null (line 50)

An instance of one of the LiveUser perm admin classes.

Inherited Variables

Inherited from RSDApplication

RSDApplication::$auth
RSDApplication::$db
RSDApplication::$errorManager
RSDApplication::$smarty
RSDApplication::$_tables
Methods
addLiveUserArea (line 267)

Adds a LiveUser Area and Area Admins.

  • return: integer (area_id) or DB Error object
  • access: public
mixed addLiveUserArea (string $applicationId, string $defineName, string $areaName, [array $areaAdmins = array()], [string $areaComment = null])
  • string $applicationId: id of application
  • string $defineName: name of area constant
  • string $areaName: name of area
  • array $areaAdmins: An array of user IDs that shall be admins of this area.
  • string $areaComment: (optional) description of area
addLiveUserAreaAdmin (line 299)

Adds an LiveUser area admin.

  • return: True or an instance of DB_Error.
mixed addLiveUserAreaAdmin (int $userId, int $areaId)
  • int $userId: The ID of the user that shall be the area of this admin.
  • int $areaId: The ID of the area the user shall be the admin of.
addLiveUserGroup (line 220)

Adds a LiveUser group and users to that group.

void addLiveUserGroup (string $groupName, [array $users = array()], [mixed $groupComment = null], [boolean $active = true], integer $ownerUser, integer $ownerGroup, string $defineName, boolean $groupComent)
  • string $defineName: name of group constant
  • string $groupName: name of group
  • array $users: (optional) array of user IDs that should be added to this group.
  • boolean $groupComent: (optional) description of group
  • boolean $active: (optional) activate group?
  • integer $ownerUser: (optional) owner_perm_user_id of group
  • integer $ownerGroup: (optional) owner_group_id of group
addLiveUserRight (line 152)

Adds a LiveUser Right including users and groups that have this right.

This method combines the funtionality of the methods 'addRight', 'grantUserRight' and 'grantGroupRight' of the class LiveUser_Perm_Container_DB_Complex_Admin (by calling these methos over callLiveUserPermAdminMethod). Can be used in a defaultInert statement as follows: $this->app->addLiveUserRight($this->db->getOne("SELECT f_folderarea FROM t_folder WHERE f_folderid='" . $this->db->quote($inserts['f_folder_id']), 'EFX_DOCUMENT_LIVEUSER_SELECT_RIGHT', 'EFX_DOCUMENT_LIVEUSER_SELECT_RIGHT', array($this->app->liveUser->getUserId()), array($this->app->liveUser->getGroupIds))

mixed addLiveUserRight (integer $areaId, string $defineName, string $rightName, [array $users = array()], [array $groups = array()], [string $rightComment = null], [boolean $hasImplied = false], [boolean $hasLevel = false], [boolean $hasScope = false])
  • integer $areaId: id of area
  • string $defineName: name of right constant
  • string $rightName: name of right
  • array $users: An array of user IDs that shall have this right.
  • array $groups: An array of group IDs that shall have this right.
  • string $rightComment: (optional) description of right
  • boolean $hasImplied: (optional) allow implied rights for this right?
  • boolean $hasLevel: (optional) apply levels to this right?
  • boolean $hasScope: (optional) apply scopes to this right?
addLiveUserUser (line 952)

Adds a new user in the auth and the perm container.

  • return: or an PEAR_Error
True addLiveUserUser (mixed $username, mixed $password, mixed $activated, [mixed $userTypeId = LIVEUSER_USER_TYPE_ID])
addLiveUserUserToGroup (line 749)
void addLiveUserUserToGroup (mixed $userId, mixed $groupId)
callLiveUserAuthAdminMethod (line 119)

Calls a method of the LiveUser auth admin class with the specified arguments.

This method loads the LiveUser auth admin class on demand to save resouces. If $this->_liveUserAuthAdmin is not of the type Object it will be assigned the return value of setUpLiveUserAuthAdmin.

  • return: If the LiveUser auth admin class does not have such a method an instance of RSError is returned. Otherwise the return value of the method call is returned.
  • see: setUpLiveUserAuthAdmin
  • see: RSDLiveUserApplication::$_liveUserAuthAdmin
mixed &callLiveUserAuthAdminMethod (String $methodName, [Array $args = array()])
  • String $methodName: The name of the method to call.
  • Array $args: An array of arguments to pass to $methodName.
callLiveUserPermAdminMethod (line 95)

Calls a method of the LiveUser perm admin class with the specified arguments.

This method loads the LiveUser perm admin class on demand to save resouces. If $this->_liveUserPermAdmin is not of the type Object it will be assigned the return value of setUpLiveUserPermAdmin.

  • return: If the LiveUser perm admin class does not have such a method an instance of RSError is returned. Otherwise the return value of the method call is returned.
  • see: setUpLiveUserPermAdmin
  • see: RSDLiveUserApplication::$_liveUserPermAdmin
mixed &callLiveUserPermAdminMethod (String $methodName, [Array $args = array()])
  • String $methodName: The name of the method to call.
  • Array $args: An array of arguments to pass to $methodName.
countLiveUserAreaAdminsByAreaId (line 626)

Returns the number of users that are admin of a certain area.

void countLiveUserAreaAdminsByAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
countLiveUserGroupsByRightId (line 525)

Returns the number of users that have a certain right.

void countLiveUserGroupsByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
countLiveUserUsersByGroupId (line 807)
void countLiveUserUsersByGroupId (mixed $groupId, [mixed $whereActive = true], [mixed $config = false])
countLiveUserUsersByRightId (line 428)

Returns the number of users that have a certain right.

void countLiveUserUsersByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
getAuthUserId (line 910)
void getAuthUserId ()
getLiveUserAreaAdminsByAreaId (line 587)

Returns all users that are admin of a certain area.

void getLiveUserAreaAdminsByAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
getLiveUserAreaAdminsByNegativeAreaId (line 637)

Returns all users that are not admin of a certain area.

void getLiveUserAreaAdminsByNegativeAreaId (mixed $areaId, [mixed $whereActive = true], [mixed $config = false])
getLiveUserAreaById (line 717)
void getLiveUserAreaById (mixed $areaId, [mixed $config = false])
getLiveUserGroupById (line 776)
void getLiveUserGroupById (mixed $groupId, [mixed $config = false])
getLiveUserGroupsByNegativeRightId (line 536)

Returns all groups that do not have a certain right.

void getLiveUserGroupsByNegativeRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
getLiveUserGroupsByRightId (line 490)

Returns all groups that have a certain right.

void getLiveUserGroupsByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
getLiveUserOptions (line 77)

Returns the property _liveUserOptions.

mixed getLiveUserOptions ()
getLiveUserUsersByGroupid (line 818)

Returns all users that are member of a certain group.

void getLiveUserUsersByGroupid (mixed $groupId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
getLiveUserUsersByNegativeGroupId (line 851)

Returns all users that are not admin of a certain area.

void getLiveUserUsersByNegativeGroupId (mixed $groupId, [mixed $whereActive = true], [mixed $config = false])
getLiveUserUsersByNegativeRightId (line 439)

Returns all users that personally do not have a certain right.

void getLiveUserUsersByNegativeRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false])
getLiveUserUsersByRightId (line 389)

Returns all users that personally have a certain right.

void getLiveUserUsersByRightId (mixed $rightId, [mixed $whereActive = true], [mixed $config = false], [mixed $fields = false])
getUserId (line 905)
void getUserId ()
grantLiveUserGroupRight (line 344)
void grantLiveUserGroupRight (mixed $groupId, mixed $rightId, [mixed $levelId = 1])
grantLiveUserUserRight (line 331)
void grantLiveUserUserRight (mixed $userId, mixed $rightId, [mixed $levelId = 1])
isAdmin (line 900)
void isAdmin ()
isInGroup (line 944)
void isInGroup (mixed $groupId)
isLiveUserAreaAdmin (line 687)

Whether the current user is admin of the given area.

void isLiveUserAreaAdmin (int $areaId, [mixed $config = false])
  • int $areaId: The ID of the area.
removeLiveUserAreaAdmin (line 316)

Removes an LiveUser area admin.

  • return: True or an instance of DB_Error.
mixed removeLiveUserAreaAdmin (int $userId, int $areaId, [mixed $preventAdminSucide = true])
  • int $userId: The ID of the user that shall be removed of the list of admins for a certain area.
  • int $areaId: The ID of the area the user shall removed from.
removeLiveUserUser (line 990)

Removes a user from the auth and the perm container.

  • return: or an PEAR_Error
True removeLiveUserUser (mixed $permId)
removeLiveUserUserFromGroup (line 761)
void removeLiveUserUserFromGroup (mixed $userId, mixed $groupId, [mixed $preventAdminSucide = true])
revokeLiveUserGroupRight (line 372)
void revokeLiveUserGroupRight (mixed $groupId, mixed $rightId, [mixed $preventAdminSucide = true])
revokeLiveUserUserRight (line 357)
void revokeLiveUserUserRight (mixed $userId, mixed $rightId, [mixed $preventAdminSucide = true])
setLiveUserOptions (line 66)

Sets the property _liveUserOptions.

void setLiveUserOptions (Array $options)
  • Array $options: An multidimensional array of configuration options.
userIsInGroup (line 915)
void userIsInGroup (mixed $userId, mixed $groupId, [mixed $config = false])

Inherited Methods

Inherited From RSDApplication

RSDApplication::RSDApplication()
RSDApplication::addTable()
RSDApplication::getTable()

Documentation generated on Mon, 8 Dec 2003 13:12:57 +0100 by phpDocumentor 1.2.3