lib/selfService.inc

Properties

Description

Interface between modules and self service pages.

This file also includes the self service profile class and helper functions.

Functions

isLAMProVersion( ) : boolean

Description

Returns if this is a LAM Pro installation.

Return value

Type Description
boolean LAM Pro installation

getSelfServiceSearchAttributes( string   $scope, ) : array

Description

Returns a list of possible search attributes for the self service.

Arguments

Name Type Description Default
$scope string

account type

Return value

Type Description
array attributes

getSelfServiceFieldSettings( string   $scope, ) : array

Description

Returns the field settings for the self service.

Arguments

Name Type Description Default
$scope string

account type

Return value

Type Description
array settings

getSelfServiceOptions( string   $scope, array   $fields, array   $attributes, boolean   $passwordChangeOnly, array   $readOnlyFields, ) : array

Description

Returns meta HTML code for each self service field.

Arguments

Name Type Description Default
$scope string

account type

$fields array

input fields (array( => array(, , ...)))

$attributes array

LDAP attributes (attribute names in lower case)

$passwordChangeOnly boolean

indicates that the user is only allowed to change his password and no LDAP content is readable

$readOnlyFields array

list of read-only fields

Return value

Type Description
array meta HTML code (array(<moduleName> => htmlTableRow))

checkSelfServiceOptions( string   $scope, string   $fields, array   $attributes, boolean   $passwordChangeOnly, array   $readOnlyFields, ) : array

Description

Checks if all input values are correct and returns the LDAP commands which should be executed.

Arguments

Name Type Description Default
$scope string

account type

$fields string

input fields (array( => array(, , ...)))

$attributes array

LDAP attributes

$passwordChangeOnly boolean

indicates that the user is only allowed to change his password and no LDAP content is readable

$readOnlyFields array

list of read-only fields

Return value

Type Description
array messages and LDAP commands (array('messages' => array(), 'add' => array(), 'del' => array(), 'mod' => array()))

getSelfServiceProfiles( ) : array

Description

Returns a list of all available self service profiles (without .conf)

Return value

Type Description
array profile names (array(<account type> => array(<profile1>, <profile2>, ...)))

loadSelfServiceProfile( string   $name, string   $scope, ) : \selfServiceProfile

Description

Loads all settings of a self service profile.

Arguments

Name Type Description Default
$name string

profile name

$scope string

account type

Return value

Type Description
\selfServiceProfile true if file was readable

saveSelfServiceProfile( string   $name, string   $scope, \selfServiceProfile   $profile, ) : boolean

Description

Saves a self service profile.
File is created, if needed

Arguments

Name Type Description Default
$name string

name of the account profile

$scope string

account type

$profile \selfServiceProfile

self service profile

Return value

Type Description
boolean true, if saving succeeded

isSelfServiceProfileWritable( string   $name, string   $scope, ) : boolean

Description

Checks if a service profile is writable.

Arguments

Name Type Description Default
$name string

profile name

$scope string

account type

Return value

Type Description
boolean true if file is writable

getSelfServiceSettings( string   $scope, \selfServiceProfile   $profile, ) : array

Description

Returns a hash array (module name => elements) of all module options for the configuration page.

Arguments

Name Type Description Default
$scope string

account type

$profile \selfServiceProfile

currently edited profile

Return value

Type Description
array configuration options

checkSelfServiceSettings( string   $scope, array   $options, \selfServiceProfile   $profile, ) : array

Description

Checks if the self service settings are valid

Arguments

Name Type Description Default
$scope string

account type

$options array

hash array containing all options (name => array(...))

$profile \selfServiceProfile

profile

Return value

Type Description
array list of error messages

Classes

selfServiceProfile

Properties

 
 
No 
No 

Description

Includes all settings of a self service profile.

Methods

__construct,

__construct( ) : \selfServiceProfile

Description

Constructor

Return value

Type Description
\selfServiceProfile

Properties

$LDAPPassword, $LDAPSuffix, $LDAPUser, $additionalCSS, $httpAuthentication, $inputFields, $loginAttributeText, $loginCaption, $mainPageText, $moduleSettings, $pageHeader, $readOnlyFields, $searchAttribute, $serverURL, $useTLS,

  public  $LDAPPassword =

LDAP password


  public  $LDAPSuffix =

LDAP suffix


  public  $LDAPUser =

LDAP user DN


  public  $additionalCSS =

list of additional CSS links (separated by \n)


  public  $httpAuthentication =

HTTP authentication


  public  $inputFields =

input fields Format: array(
array(array('name' => , 'fields' => array(, ))),
array(array('name' => , 'fields' => array(, )))
)



  public  $loginAttributeText =

describing text for search attribute


  public  $loginCaption =

describing text for user login


  public  $mainPageText =

describing text for self service main page


  public  $moduleSettings =

configuration settings of modules


  public  $pageHeader =

header for self service pages


  public  $readOnlyFields =

List of fields that are set in read-only mode.


  public  $searchAttribute =

LDAP search attribute


  public  $serverURL =

server address


  public  $useTLS =

use TLS


Documentation was generated by phpDocumentor 2.0.1 .

Namespaces

  • global

    Packages