srcuserAdministration.php

Functions

addUser()

addUser() : void

Adds a new user to the set of available users.

readPwd()

readPwd(string  $salt) : string

Reads a password from the console and returns a hash of it (including salt).

Parameters

string $salt

A salt for the password.

Returns

string —

A hash of password and salt.

createId()

createId() : int

Creates an identifier for a new user.

Returns

int —

The new id.

editUser()

editUser(string  $userId) : void

Allows to change the password of a user or to create an authentication code for a user, given by id.

Parameters

string $userId

The id of the user who should be edited.

deleteUser()

deleteUser(string  $userId) : void

Deletes a user, given by id.

Parameters

string $userId

The id of the user who should get deleted.

listUser()

listUser() : void

Displays a list of all currently available users.