Class Session
Session Class
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public
string
|
|
public static
boolean
|
|
public static
boolean
|
|
public static
|
#
addToNavigateListItems( string $itemtype, integer $ID )
Add an item to the navigate through search results list |
public static
|
#
initNavigateListItems( string $itemtype, string $title = "" )
Initialise a list of items to use navigate through search results |
public static
Nothing
|
#
changeActiveEntities( integer|'All' $ID = "all", boolean $is_recursive = false )
Change active entity to the $ID one. Update glpiactiveentities session variable. Reload groups related to this entity. |
public static
|
#
changeProfile( integer $ID )
Change active profile to the $ID one. Update glpiactiveprofile session variable. |
public static
|
#
initEntityProfiles( integer $userID )
Set the entities session variable. Load all entities from DB |
public static
|
|
public static
|
#
loadLanguage( string $forcelang = '', boolean $with_plugins = true )
Include the good language dict. |
public static
integer
|
|
public static
boolean
|
|
public static
false|integer|string
|
#
getLoginUserID( boolean $force_human = true )
Get the Login User ID or return cron user ID for cron jobs |
public static
|
|
public static
|true
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
|
public static
|
#
checkRight( string $module, integer $right )
Check if I have the right $right to module $module (conpare to session variable) |
public static
|
#
checkRightsOr( string $module, array $rights = [] )
Check if I one right of array $rights to module $module (conpare to session variable) |
public static
|
|
public static
boolean
|
|
public static
boolean
|
#
haveAccessToEntity( integer $ID, boolean $is_recursive = 0 )
Check if you could access (read) to the entity of id = $ID |
public static
boolean
|
#
haveAccessToOneOfEntities( array $tab, boolean $is_recursive = 0 )
Check if you could access to one entity of an list |
public static
boolean
|
#
haveRecursiveAccessToEntity( integer $ID )
Check if you could create recursive object in the entity of id = $ID |
public static
boolean
|
|
public static
boolean
|
#
haveRightsAnd( string $module, integer[] $rights = [] )
Have I all rights of array $rights to module $module (conpare to session variable) |
public static
boolean
|
#
haveRightsOr( string $module, integer[] $rights = [] )
Have I one right of array $rights to module $module (conpare to session variable) |
public static
string
|
|
public static
|
#
addMessageAfterRedirect( string $msg, boolean $check_once = false, integer $message_type = INFO, boolean $reset = false )
Add a message to be displayed after redirect |
public static
|
|
public static
mixed
|
#
getSavedOption( string $itemtype, string $name, mixed $defvalue )
Get a saved option from request or session if get from request, save it |
public static
boolean
|
|
public static
string
|
|
public static
|
|
public static
boolean
|
#
validateCSRF( array $data )
Validate that the page has a CSRF token in the POST data and that the token is legit/not expired. If the token is valid it will be removed from the list of valid tokens. |
public static
|
|
public static
boolean
|
|
public static
false
|
integer |
NORMAL_MODE
|
#
0
|
integer |
TRANSLATION_MODE
|
#
1
|
integer |
DEBUG_MODE
|
#
2
|