This class manages .conf files.

package configuration

 Methods

Loads preferences from config file

__construct(String $file) 

Parameters

$file

String

file name without ".conf" (e.g. lam)

Checks if the given password matches.

check_Passwd(String $password) : boolean

Parameters

$password

String

Returns

booleantrue, if matches

Returns the access level for this profile.

getAccessLevel() : int

Returns

intlevel

Returns if HTTP authentication should be used.

getHttpAuthentication() : String

Returns

String$httpAuthentication use HTTP authentication ('true' or 'false')

Returns the sender address for password reset mails.

getLamProMailFrom() : String

Returns

Stringmail address

Returns if the password reset mail content should be treated as HTML.

getLamProMailIsHTML() : boolean

Returns

booleanHTML or text

Returns the reply-to address for password reset mails.

getLamProMailReplyTo() : String

Returns

Stringmail address

Returns the subject for password reset mails.

getLamProMailSubject() : String

Returns

Stringsubject

Returns the mail body for password reset mails.

getLamProMailText() : String

Returns

Stringbody

Returns the login method.

getLoginMethod() : String

see \global\LAMconfig::LOGIN_LIST
see \global\LAMconfig::LOGIN_SEARCH

Returns

Stringlogin method

Returns the DN for the login search bind user.

getLoginSearchDN() : String

Returns

StringDN

Returns the login search filter.

getLoginSearchFilter() : String

Returns

Stringsearch filter

Returns the password for the login search bind user.

getLoginSearchPassword() : String

Returns

Stringpassword

Returns the login search suffix.

getLoginSearchSuffix() : String

Returns

Stringsuffix

Returns the name of the config file

getName() : String

Returns

Stringname

Returns the path to the config file.

getPath() : string

Returns

stringpath on filesystem

Returns the tool settings.

getToolSettings() : array

Returns

array$toolSettings tool settings

Returns if TLS is activated.

getUseTLS() : String

Returns

Stringyes or no

Returns an array of all selected account modules

get_AccountModules(string $scope) : array

Parameters

$scope

string

account type

Returns

arrayuser modules

Returns a list of active account types.

get_ActiveTypes() : array

Returns

arraylist of types

Returns an array of string with all admin names

get_Admins() : array

Returns

arraythe admin names

Returns all admin users seperated by semicolons

get_Adminstring() : string

Returns

stringthe admin string

Returns the server address as string

get_ServerURL() : string

Returns

stringserver address

Returns the LDAP suffix for the given account type

get_Suffix(string $scope) : string

Parameters

$scope

string

account type

Returns

stringthe LDAP suffix

Returns the LDAP cache timeout in minutes

get_cacheTimeout() : integer

Returns

integercache time

Returns the LDAP cache timeout in seconds

get_cacheTimeoutSec() : integer

Returns

integercache time

Returns the default language string

get_defaultLanguage() : string

Returns

stringdefault language

Returns the list of attributes to show in user list

get_listAttributes(string $scope) : string

Parameters

$scope

string

account type

Returns

stringthe attribute list

Returns a list of saved module settings

get_moduleSettings() : array

Returns

arraylist of settings: array(name => value)

Returns the path to the external script

get_scriptPath() : string

Returns

stringscript path

Returns the chmod value for new home directories.

get_scriptRights() : string

Returns

stringrights

Returns the servers of the external script as a Array

get_scriptServers() : string

Returns

stringscript servers

Returns the LDAP search limit.

get_searchLimit() : integer

Returns

integersearch limit

Returns a list of saved type settings

get_typeSettings() : array

Returns

arraylist of settings: array(name => value)

Returns if the file can be written on the filesystem.

isWritable() : boolean

Returns

booleantrue if file is writable

Saves preferences to config file

save() 

Sets the access level for this profile.

setAccessLevel(int $level) 

Parameters

$level

int

level

Specifies if HTTP authentication should be used.

setHttpAuthentication(String $httpAuthentication) 

Parameters

$httpAuthentication

String

use HTTP authentication ('true' or 'false')

Sets the sender address for password reset mails.

setLamProMailFrom(String $lamProMailFrom) : boolean

Parameters

$lamProMailFrom

String

mail address

Returns

booleantrue if address is valid

Sets if the password reset mail content should be treated as HTML.

setLamProMailIsHTML(boolean $lamProMailIsHTML) 

Parameters

$lamProMailIsHTML

boolean

Sets the reply-to address for password reset mails.

setLamProMailReplyTo(String $lamProMailReplyTo) : boolean

Parameters

$lamProMailReplyTo

String

mail address

Returns

booleantrue if address is valid

Sets the subject for password reset mails.

setLamProMailSubject(String $lamProMailSubject) 

Parameters

$lamProMailSubject

String

subject

Sets the mail body for password reset mails.

setLamProMailText(String $lamProMailText) 

Parameters

$lamProMailText

String

body

Sets the login method.

setLoginMethod(String $loginMethod) 

Parameters

$loginMethod

String

Sets the DN for the login search bind user.

setLoginSearchDN(String $loginSearchDN) : boolean

Parameters

$loginSearchDN

String

DN

Returns

booleantrue if DN is valid

Sets the login search filter.

setLoginSearchFilter(String $loginSearchFilter) 

Parameters

$loginSearchFilter

String

search filter

Sets the password for the login search bind user.

setLoginSearchPassword(String $loginSearchPassword) 

Parameters

$loginSearchPassword

String

password

Sets the login search suffix.

setLoginSearchSuffix(String $loginSearchSuffix) 

Parameters

$loginSearchSuffix

String

suffix

Sets the tool settings.

setToolSettings(array $toolSettings) : boolean

Parameters

$toolSettings

array

tool settings

Returns

booleantrue if ok

Sets if TLS is activated.

setUseTLS(String $useTLS) : boolean

Parameters

$useTLS

String

yes or no

Returns

booleantrue if $useTLS has correct format

Sets the selected account modules

set_AccountModules(array $modules, string $scope) : boolean

Parameters

$modules

array

array with module names (not aliases!)

$scope

string

account type

Returns

booleantrue if $modules has correct format

Sets the list of active types.

set_ActiveTypes(array $types) 

Parameters

$types

array

list of types

Sets the admin string

set_Adminstring(string $value) : boolean

Parameters

$value

string

new admin string that contains all admin users seperated by semicolons

Returns

booleantrue if $value has correct format

Sets the preferences wizard password

set_Passwd(string $value) : boolean

Parameters

$value

string

new password

Returns

booleantrue if $value has correct format

Sets the server address

set_ServerURL(string $value) : boolean

Parameters

$value

string

new server address

Returns

booleantrue if $value has correct format

Sets the LDAP suffix where accounts are saved

set_Suffix(string $scope, string $value) : boolean

Parameters

$scope

string

account type

$value

string

new LDAP suffix

Returns

booleantrue if $value has correct format

Sets the LDAP cache timeout in minutes (0,1,2,5,10,15)

set_cacheTimeout(integer $value) : boolean

Parameters

$value

integer

new cache timeout

Returns

booleantrue if $value has correct format

Sets the default language string

set_defaultLanguage(string $value) : boolean

Parameters

$value

string

new default language

Returns

booleantrue if $value has correct format

Sets the list of attributes to show in user list

set_listAttributes(string $value, string $scope) : boolean

Parameters

$value

string

new attribute string

$scope

string

account type

Returns

booleantrue if $value has correct format

Sets the settings for the account modules.

set_moduleSettings(array $settings) : boolean

Parameters

$settings

array

list of module setting array(name => value)

Returns

booleantrue if $settings has correct format

Sets the path to the external script

set_scriptPath(string $value) : boolean

Parameters

$value

string

new script path

Returns

booleantrue if $value has correct format

Sets the rights for the home directory.

set_scriptRights(string $chmod) : boolean

Parameters

$chmod

string

the rights

Returns

booleantrue if values has correct format

Sets the servers of the external script

set_scriptServers(string $value) : boolean

Parameters

$value

string

new script servers

Returns

booleantrue if $value has correct format

Sets the LDAP search limit.

set_searchLimit(integer $value) : boolean

Parameters

$value

integer

new search limit

Returns

booleantrue if $value has correct format

Sets the settings for the account types.

set_typeSettings(array $settings) : boolean

Parameters

$settings

array

list of type setting array(name => value)

Returns

booleantrue if $settings has correct format

Returns the hashed password.

hashPassword(String $password, String $salt) : String

Parameters

$password

String

password

$salt

String

salt

Returns

Stringhash value

Reloads preferences from config file

reload() : boolean

Returns

booleantrue if file was readable

 Properties

 

Array of string: users with admin rights

$Admins 

 

Password to edit preferences

$Passwd 

 

Server address (e.g.

$ServerURL 

ldap://127.0.0.1:389)

 

access level

$accessLevel 

 

Active account types

$activeTypes 

 

LDAP cache timeout

$cachetimeout 

 

Default language

$defaultLanguage 

 

Name of configuration file

$file 

 

specifies if HTTP authentication should be used

$httpAuthentication 

 

email address for sender of password reset mails

$lamProMailFrom 

 

treat password reset mail body as HTML

$lamProMailIsHTML 

 

reply-to email address for password reset mails

$lamProMailReplyTo 

 

subject for password reset mails

$lamProMailSubject 

 

mail body for password reset mails

$lamProMailText 

 

login method

$loginMethod 

 

bind user for login search

$loginSearchDN 

 

search filter for login

$loginSearchFilter 

 

bind password for login search

$loginSearchPassword 

 

search suffix for login

$loginSearchSuffix 

 

module settings

$moduleSettings 

 

Path to external lamdaemon script on server where it is executed

$scriptPath 

This is used for managing quota and home directories. optional setting, may not be defined

 

The rights for the home directory

$scriptRights 

 

Servers where lamdaemon script is executed

$scriptServer 

This is used for managing quota and home directories. optional setting, may not be defined

 

LDAP search limit

$searchLimit 

 

List of all settings in config file

$settings 

 

tool settings

$toolSettings 

 

LDAP suffix for tree view

$treesuffix 

 

type settings

$typeSettings 

 

enables/disables TLS encryption

$useTLS 

 Constants

 

ACCESS_ALL

ACCESS_ALL 

 

ACCESS_PASSWORD_CHANGE

ACCESS_PASSWORD_CHANGE 

 

ACCESS_READ_ONLY

ACCESS_READ_ONLY 

 

line separator

LINE_SEPARATOR 

     

SAVE_FAIL

SAVE_FAIL 

 

SAVE_OK

SAVE_OK