LDAP Account Manager

Uploader
in package

Creates LDAP accounts for file upload.

Tags
author

Roland Gruber

Table of Contents

TIME_LIMIT  = 10
$accounts  : array<string|int, mixed>
$data  : array<string|int, mixed>
$endTime  : int
$type  : ConfiguredType
__construct()  : mixed
Constructor
cleanSession()  : void
Cleans old session data.
doUpload()  : string
Start or continues the file upload.
buildUploadStatus()  : string
Returns the upload status as JSON.
continueUpload()  : string
Continues to upload accounts.
createPDF()  : string
Creates the PDF files.
deleteOldEntryIfNeeded()  : array<string|int, array<string|int, string>>
Deletes an existing entry if the overwrite option is used.
runModulePostActions()  : array<string, string|int|string[]>
Runs a single post create action by modules.
runPostActions()  : string
Performs any post-create actions by modules.
securityCheck()  : void
Checks for security violations and stops processing if needed.
startUpload()  : string
Starts the file upload.
uploadEntry()  : void
Performs the upload of a single LDAP entry.

Constants

TIME_LIMIT

private mixed TIME_LIMIT = 10

Properties

$accounts

private array<string|int, mixed> $accounts

LDAP accounts

$data

private array<string|int, mixed> $data

data

Methods

cleanSession()

Cleans old session data.

public static cleanSession() : void
Return values
void

doUpload()

Start or continues the file upload.

public doUpload() : string
Return values
string

JSON of upload status

buildUploadStatus()

Returns the upload status as JSON.

private buildUploadStatus(number $accountsProgress[, bool $accountsFinished = false ][, string $postActionsTitle = '' ], number $postActionsProgress[, bool $postActionsFinished = false ], number $pdfProgress) : string
Parameters
$accountsProgress : number

progress for LDAP entries

$accountsFinished : bool = false

all entries in LDAP

$postActionsTitle : string = ''

title for current post action

$postActionsProgress : number

progress for post actions

$postActionsFinished : bool = false

post actions finished

$pdfProgress : number

PDF creation progress

Return values
string

JSON status

continueUpload()

Continues to upload accounts.

private continueUpload() : string
Return values
string

JSON of upload status

createPDF()

Creates the PDF files.

private createPDF() : string
Tags
throws
LAMException

error during PDF creation

Return values
string

JSON of upload status

deleteOldEntryIfNeeded()

Deletes an existing entry if the overwrite option is used.

private deleteOldEntryIfNeeded(string $dn, array<string, string|string[]> $attributes) : array<string|int, array<string|int, string>>
Parameters
$dn : string

DN

$attributes : array<string, string|string[]>

attribute list

Return values
array<string|int, array<string|int, string>>

list of error messages

runModulePostActions()

Runs a single post create action by modules.

private runModulePostActions() : array<string, string|int|string[]>
Return values
array<string, string|int|string[]>

status array

runPostActions()

Performs any post-create actions by modules.

private runPostActions() : string
Return values
string

JSON of upload status

securityCheck()

Checks for security violations and stops processing if needed.

private securityCheck() : void
Return values
void

startUpload()

Starts the file upload.

private startUpload() : string
Return values
string

JSON of upload status

uploadEntry()

Performs the upload of a single LDAP entry.

private uploadEntry(int $position) : void
Parameters
$position : int

position in $this->accounts.

Return values
void

Search results