PHP Class Profile_User, glpi

Inheritance: extends CommonDBTM
Show file Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$auto_message_on_action From CommonDBTM
$checkItem_2_Rights
$disableAutoEntityForwarding Manage Entity properties forwarding
$items_id_1
$items_id_2
$itemtype_1 From CommonDBRelation
$itemtype_2
$log_history_1_add
$log_history_1_delete
$logs_for_item_1
$logs_for_item_2 Specific log system

Public Methods

Method Description
canCreateItem ( ) TODO CommonDBConnexity : check in details if we can replace canCreateItem by canRelationItem .
deleteRights ( $user_ID, $only_dynamic = false )
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getEntitiesForProfileByUser ( $users_id, $profiles_id, $child = false ) : Array retrieve the entities allowed to a user for a profile
getEntitiesForUser ( $users_id, $child = false ) : Array retrieve the entities associated to a user
getForUser ( $user_ID, $only_dynamic = false ) : array Get entities for which a user have a right
getForbiddenStandardMassiveAction ( )
getRawName ( )
getRelationInputForProcessingOfMassiveActions ( $action, CommonDBTM $item, array $ids, array $input )
getRelationMassiveActionsSpecificities ( )
getSearchOptions ( )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTypeName ( $nb )
getUserEntities ( $user_ID, $is_recursive = true, $default_first = false ) : array Get entities for which a user have a right
getUserEntitiesForRight ( $user_ID, $right, $is_recursive = true ) : array Get entities for which a user have a right
getUserProfiles ( $user_ID, $sqlfilter = '' ) : array Get user profiles (no entity association, use sqlfilter if needed)
haveUniqueRight ( $user_ID, $profile_id )
maybeRecursive ( )
prepareInputForAdd ( $input )
showForEntity ( Entity $entity ) Show users of an entity
showForProfile ( Profile $prof ) Show the User having a profile, in allowed Entity
showForUser ( User $user ) Show rights of a user
showRelationMassiveActionsSubForm ( MassiveAction $ma, $peer_number )

Method Details

canCreateItem() public method

..
public canCreateItem ( )

deleteRights() static public method

static public deleteRights ( $user_ID, $only_dynamic = false )
$user_ID
$only_dynamic (false by default)

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI

getEntitiesForProfileByUser() static public method

retrieve the entities allowed to a user for a profile
static public getEntitiesForProfileByUser ( $users_id, $profiles_id, $child = false ) : Array
$users_id Integer ID of the user
$profiles_id Integer ID of the profile
$child Boolean when true, include child entity when recursive right (false by default)
return Array of entity ID

getEntitiesForUser() static public method

retrieve the entities associated to a user
static public getEntitiesForUser ( $users_id, $child = false ) : Array
$users_id Integer ID of the user
$child Boolean when true, include child entity when recursive right (false by default)
return Array of entity ID

getForUser() static public method

Get entities for which a user have a right
static public getForUser ( $user_ID, $only_dynamic = false ) : array
$user_ID user ID
$only_dynamic get only recursive rights (false by default)
return array of entities ID

getForbiddenStandardMassiveAction() public method

See also: CommonDBTM::getForbiddenStandardMassiveAction()

getRawName() public method

See also: CommonDBTM::getRawName()
public getRawName ( )

getRelationInputForProcessingOfMassiveActions() static public method

See also: CommonDBRelation::getRelationInputForProcessingOfMassiveActions()
static public getRelationInputForProcessingOfMassiveActions ( $action, CommonDBTM $item, array $ids, array $input )
$item CommonDBTM
$ids array
$input array

getRelationMassiveActionsSpecificities() static public method

See also: CommonDBRelation::getRelationMassiveActionsSpecificities()

getSearchOptions() public method

public getSearchOptions ( )

getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTypeName() static public method

static public getTypeName ( $nb )

getUserEntities() static public method

Get entities for which a user have a right
static public getUserEntities ( $user_ID, $is_recursive = true, $default_first = false ) : array
$user_ID user ID
$is_recursive check also using recursive rights (true by default)
$default_first user default entity first (false by default)
return array of entities ID

getUserEntitiesForRight() static public method

Get entities for which a user have a right
static public getUserEntitiesForRight ( $user_ID, $right, $is_recursive = true ) : array
$user_ID integer user ID
$right right to check
$is_recursive check also using recursive rights (true by default)
return array of entities ID

getUserProfiles() static public method

Get user profiles (no entity association, use sqlfilter if needed)
static public getUserProfiles ( $user_ID, $sqlfilter = '' ) : array
$user_ID user ID
$sqlfilter string additional filter (must start with AND) (default '')
return array of the IDs of the profiles

haveUniqueRight() static public method

static public haveUniqueRight ( $user_ID, $profile_id )
$user_ID
$profile_id

maybeRecursive() public method

public maybeRecursive ( )

prepareInputForAdd() public method

public prepareInputForAdd ( $input )

showForEntity() static public method

Show users of an entity
static public showForEntity ( Entity $entity )
$entity Entity Entity object

showForProfile() static public method

Show the User having a profile, in allowed Entity
static public showForProfile ( Profile $prof )
$prof Profile Profile object

showForUser() static public method

Show rights of a user
static public showForUser ( User $user )
$user User User object

showRelationMassiveActionsSubForm() static public method

See also: CommonDBRelation::showRelationMassiveActionsSubForm()
static public showRelationMassiveActionsSubForm ( MassiveAction $ma, $peer_number )
$ma MassiveAction

Property Details

$auto_message_on_action public property

From CommonDBTM
public $auto_message_on_action

$checkItem_2_Rights public static property

public static $checkItem_2_Rights

$disableAutoEntityForwarding public static property

Manage Entity properties forwarding
public static $disableAutoEntityForwarding

$items_id_1 public static property

public static $items_id_1

$items_id_2 public static property

public static $items_id_2

$itemtype_1 public static property

From CommonDBRelation
public static $itemtype_1

$itemtype_2 public static property

public static $itemtype_2

$log_history_1_add public static property

public static $log_history_1_add

$log_history_1_delete public static property

public static $log_history_1_delete

$logs_for_item_1 public static property

public static $logs_for_item_1

$logs_for_item_2 public static property

Specific log system
public static $logs_for_item_2