Property | Type | Description | |
---|---|---|---|
$dohistory | From CommonDBTM | ||
$rightname |
Method | Description | |
---|---|---|
addTimestampRestrictions ( $begin_date, $end_date ) | ||
canCreate ( ) | ||
canPurge ( ) | ||
cleanDBonPurge ( ) | ||
connect ( ) | Open LDAP connexion to current serveur | |
connectToServer ( $host, $port, $login = "", $password = "", $use_tls = false, $deref_options ) : link | Connect to a LDAP serveur | |
date2ldapTimeStamp ( $date ) : ldap | Converts a Unix timestamp to an LDAP timestamps | |
defineTabs ( $options = [] ) | ||
displayLdapFilter ( $target, $users = true ) : nothing | Display LDAP filter | |
displaySizeLimitWarning ( $limitexceeded = false ) | ||
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
dnExistsInLdap ( $ldap_infos, $user_dn ) : false | Check if a user DN exists in a ldap user search result | |
dropdownGroupSearchType ( array $options ) | ||
dropdownUserDeletedActions ( $value ) | ||
getAllGroups ( $auths_id, $filter, $filter2, $entity, &$limitexceeded, $order = 'DESC' ) : array | Get all LDAP groups from a ldap server which are not already in an entity | |
getAllReplicateForAMaster ( $master_id ) : array | Get all replicate servers for a master one | |
getAllUsers ( $options = [], &$results, &$limitexceeded ) : array | Get the list of LDAP users to add/synchronize | |
getDefault ( ) | ||
getGroupByDn ( $ds, $group_dn ) : group | Get infos for groups | |
getGroupCNByDn ( $ldap_connection, $group_dn ) : the | Get the group's cn by giving his DN | |
getGroupSearchTypeName ( $val = NULL ) : array | Get the possible value for contract alert | |
getGroupsFromLDAP ( $ldap_connection, $config_ldap, $filter, $search_in_groups = true, $groups = [], &$limitexceeded ) | ||
getLdapServers ( ) | ||
getNumberOfServers ( ) | ||
getObjectByDn ( $ds, $condition, $dn, $attrs = [], $clean = true ) | Get an object from LDAP by giving his DN | |
getSearchOptions ( ) | ||
getServersWithImportByEmailActive ( ) : array | Return all the ldap servers where email field is configured | |
getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
getSyncFields ( array $authtype_array ) : array | Get LDAP fields to sync to GLPI data from a glpi_authldaps array | |
getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
getTypeName ( $nb ) | ||
getUserByDn ( $ds, $user_dn, $attrs, $clean = true ) | ||
get_entries_clean ( $link, $result ) : an | Get ldap query results and clean them at the same time | |
importUserFromServers ( $options = [] ) | Import a user from ldap Check all the directories. When the user is found, then import it | |
isLdapPageSizeAvailable ( $config_ldap, $check_config_value = true ) | Check if ldap results can be paged or not This functionnality is available for PHP 5.4 and higer | |
ldapAuth ( $auth, $login, $password, $ldap_method, $user_dn ) : identification | Authentify a user by checking a specific directory | |
ldapChooseDirectory ( $target ) : nothing | Form to choose a ldap server | |
ldapImportGroup ( $group_dn, $options = [] ) : nothing | Converts an array of parameters into a query string to be appended to a URL. | |
ldapImportUserByServerId ( $params = [], $action, $ldap_server, $display = false ) : array | Import a user from a specific ldap server | |
ldapStamp2UnixStamp ( $ldapstamp, $ldap_time_offset ) : unix | Converts LDAP timestamps over to Unix timestamps | |
local_cmp ( $a, $b ) | ||
manageValuesInSession ( $options = [], $delete = false ) | ||
post_addItem ( ) | ||
post_getEmpty ( ) | ||
post_updateItem ( $history = 1 ) | ||
preconfig ( $type ) : nothing | Preconfig datas for standard system | |
prepareInputForAdd ( $input ) | ||
prepareInputForUpdate ( $input ) | ||
processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids ) | ||
searchForUsers ( $ds, $values, $filter, $attrs, &$limitexceeded, &$user_infos, &$ldap_users, $config_ldap ) | ||
searchUser ( AuthLDAP $authldap ) | ||
searchUserDn ( $ds, $options = [] ) : dn | Get dn for a user | |
showDateRestrictionForm ( $options = [] ) | ||
showForm ( $ID, $options = [] ) : Nothing | Print the auth ldap form | |
showFormAdvancedConfig ( ) | ||
showFormEntityConfig ( ) | ||
showFormGroupsConfig ( ) | ||
showFormReplicatesConfig ( ) | ||
showFormTestLDAP ( ) | ||
showFormUserConfig ( ) | ||
showLdapGroups ( $target, $start, $sync, $filter = '', $filter2 = '', $entity, $order = 'DESC' ) : nothing | Show LDAP groups to add or synchronise in an entity | |
showLdapUsers ( ) : nothing | Show LDAP users to add or synchronise | |
showSystemInformations ( $width ) | ||
showUserImportForm ( AuthLDAP $authldap ) | ||
testLDAPConnection ( $auths_id, $replicate_id ) : boolean | Test a LDAP connection | |
tryLdapAuth ( $auth, $login, $password, $auths_id, $user_dn = false, $break = true ) : identification | Try to authentify a user by checking all the directories | |
tryToConnectToServer ( $ldap_method, $login, $password ) : link | Try to connect to a ldap server | |
unsetUndisclosedFields ( &$fields ) | ||
useAuthLdap ( ) : boolean | Is the LDAP authentication used ? |
Method | Description | |
---|---|---|
buildLdapFilter ( AuthLdap $authldap ) |
static public addTimestampRestrictions ( $begin_date, $end_date ) | ||
$begin_date | datetime begin date to search (NULL if not take into account) | |
$end_date | datetime end date to search (NULL if not take into account) |
static public connectToServer ( $host, $port, $login = "", $password = "", $use_tls = false, $deref_options ) : link | ||
$host | LDAP host to connect | |
$port | port to use | |
$login | login to use (default '') | |
$password | password to use (default '') | |
$use_tls | use a tls connection ? (false by default) | |
$deref_options | deref options used | |
return | link | to the LDAP server : false if connection failed |
static public date2ldapTimeStamp ( $date ) : ldap | ||
$date | datetime | |
return | ldap | timestamp |
static public displayLdapFilter ( $target, $users = true ) : nothing | ||
$target | target for the form | |
$users | boolean for user ? (true by default) | |
return | nothing |
static public displaySizeLimitWarning ( $limitexceeded = false ) | ||
$limitexceeded | (false by default) |
static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate ) | ||
$item | CommonGLPI |
static public dnExistsInLdap ( $ldap_infos, $user_dn ) : false | ||
$ldap_infos | ldap user search result | |
$user_dn | user dn to look for | |
return | false | if the user dn doesn't exist, user ldap infos otherwise |
static public dropdownGroupSearchType ( array $options ) | ||
$options | array | array |
static public dropdownUserDeletedActions ( $value ) | ||
$value | (default 0) |
static public getAllGroups ( $auths_id, $filter, $filter2, $entity, &$limitexceeded, $order = 'DESC' ) : array | ||
$auths_id | ID of the server to use | |
$filter | ldap filter to use | |
$filter2 | second ldap filter to use if needed | |
$entity | entity to search | |
$limitexceeded | ||
$order | order to use (default DESC) | |
return | array | of the groups |
static public getAllReplicateForAMaster ( $master_id ) : array | ||
$master_id | : master ldap server ID | |
return | array | of the replicate servers |
static public getAllUsers ( $options = [], &$results, &$limitexceeded ) : array | ||
$options | array of possible options: - authldaps_id ID of the server to use - mode user to synchronise or add ? - ldap_filter ldap filter to use - basedn force basedn (default authldaps_id one) - order display order - begin_date begin date to time limit - end_date end date to time limit - script true if called by an external script | |
return | array | of the user |
static public getGroupByDn ( $ds, $group_dn ) : group | ||
$ds | LDAP link | |
$group_dn | dn of the group | |
return | group | infos if found, else false |
static public getGroupCNByDn ( $ldap_connection, $group_dn ) : the | ||
$ldap_connection | ldap connection to use | |
$group_dn | the group's dn | |
return | the | group cn |
static public getGroupSearchTypeName ( $val = NULL ) : array | ||
$val | if not set, ask for all values, else for 1 value (default NULL) | |
return | array | or string |
static public getGroupsFromLDAP ( $ldap_connection, $config_ldap, $filter, $search_in_groups = true, $groups = [], &$limitexceeded ) | ||
$ldap_connection | ||
$config_ldap | ||
$filter | ||
$search_in_groups | (true by default) | |
$groups | array | |
$limitexceeded |
static public getObjectByDn ( $ds, $condition, $dn, $attrs = [], $clean = true ) | ||
$dn | string DN of the object | |
$clean | (true by default) |
static public getServersWithImportByEmailActive ( ) : array | ||
return | array | of LDAP server's ID |
static public getSpecificValueToDisplay ( $field, $values, array $options = [] ) | ||
$field | ||
$values | ||
$options | array | array |
static public getSpecificValueToSelect ( $field, $name = '', $values = '', array $options = [] ) | ||
$field | ||
$name | (default '') | |
$values | (default('') | |
$options | array | array |
static public getSyncFields ( array $authtype_array ) : array | ||
$authtype_array | array | array Authentication method config array (from table) |
return | array | of "user table field name" => "config value" |
public getTabNameForItem ( CommonGLPI $item, $withtemplate ) | ||
$item | CommonGLPI |
static public getUserByDn ( $ds, $user_dn, $attrs, $clean = true ) | ||
$ds | ||
$user_dn | ||
$attrs | ||
$clean | (true by default) |
static public get_entries_clean ( $link, $result ) : an | ||
return | an | array which contains ldap query results |
static public importUserFromServers ( $options = [] ) | ||
$options | array containing condition: array('name'=>'glpi') or array('email' => 'test at test.com') |
static public isLdapPageSizeAvailable ( $config_ldap, $check_config_value = true ) |
static public ldapAuth ( $auth, $login, $password, $ldap_method, $user_dn ) : identification | ||
$auth | identification object | |
$login | user login | |
$password | user password | |
$ldap_method | ldap_method array to use | |
$user_dn | user LDAP DN if present | |
return | identification | object |
static public ldapChooseDirectory ( $target ) : nothing | ||
$target | target page for the form | |
return | nothing |
static public ldapImportGroup ( $group_dn, $options = [] ) : nothing | ||
$group_dn | dn of the group to import | |
$options | array for - authldaps_id - entities_id where group must to be imported - is_recursive | |
return | nothing |
static public ldapImportUserByServerId ( $params = [], $action, $ldap_server, $display = false ) : array | ||
$params | array of parameters: method (IDENTIFIER_LOGIN or IDENTIFIER_EMAIL) + value | |
$action | synchoronize (true) or import (false) | |
$ldap_server | ID of the LDAP server to use | |
$display | display message information on redirect (false by default) | |
return | array | with state, else false |
static public ldapStamp2UnixStamp ( $ldapstamp, $ldap_time_offset ) : unix | ||
$ldapstamp | LDAP timestamp | |
$ldap_time_offset | time offset (default 0) | |
return | unix | timestamp |
static public manageValuesInSession ( $options = [], $delete = false ) | ||
$options | array | |
$delete | (false by default) |
public preconfig ( $type ) : nothing | ||
$type | type of standard system : AD | |
return | nothing |
static public processMassiveActionsForOneItemtype ( MassiveAction $ma, CommonDBTM $item, array $ids ) | ||
$ma | MassiveAction | |
$item | CommonDBTM | |
$ids | array |
static public searchForUsers ( $ds, $values, $filter, $attrs, &$limitexceeded, &$user_infos, &$ldap_users, $config_ldap ) |
static public searchUser ( AuthLDAP $authldap ) | ||
$authldap | AuthLDAP | AuthLDAP object |
static public searchUserDn ( $ds, $options = [] ) : dn | ||
$ds | LDAP link | |
$options | array of possible options: - basedn : base dn used to search - login_field : attribute to store login - search_parameters array of search parameters - user_params array of parameters : method (IDENTIFIER_LOGIN or IDENTIFIER_EMAIL) + value - condition : ldap condition used | |
return | dn | of the user, else false |
static public showDateRestrictionForm ( $options = [] ) | ||
$options | array |
public showForm ( $ID, $options = [] ) : Nothing | ||
$ID | integer ID of the item | |
$options | array - target for the form | |
return | Nothing | (display) |
static public showLdapGroups ( $target, $start, $sync, $filter = '', $filter2 = '', $entity, $order = 'DESC' ) : nothing | ||
$target | target page for the form | |
$start | where to start the list | |
$sync | synchronise or add ? (default 0) | |
$filter | ldap filter to use (default '') | |
$filter2 | second ldap filter to use (which case ?) (default '') | |
$entity | working entity | |
$order | display order (default DESC) | |
return | nothing |
static public showLdapUsers ( ) : nothing | ||
return | nothing |
static public showUserImportForm ( AuthLDAP $authldap ) | ||
$authldap | AuthLDAP | AuthLDAP object |
static public testLDAPConnection ( $auths_id, $replicate_id ) : boolean | ||
$auths_id | ID of the LDAP server | |
$replicate_id | use a replicate if > 0 (default -1) | |
return | boolean | connection succeeded ? |
static public tryLdapAuth ( $auth, $login, $password, $auths_id, $user_dn = false, $break = true ) : identification | ||
$auth | identification object | |
$login | user login | |
$password | user password | |
$auths_id | auths_id already used for the user (default 0) | |
$user_dn | user LDAP DN if present (false by default) | |
$break | if user is not found in the first directory, stop searching or try the following ones (true by default) | |
return | identification | object |
static public tryToConnectToServer ( $ldap_method, $login, $password ) : link | ||
$ldap_method | ldap_method array to use | |
$login | User Login | |
$password | User Password | |
return | link | to the LDAP server : false if connection failed |
static public useAuthLdap ( ) : boolean | ||
return | boolean |