USER Methods

directory()

Inside the data-directory there is a secured folder for each user which the user can only access while logged into the system.

string directory([ string name [, int format = 3 [, bool create = false ]]])

Return

The name of a user's secured directory

Parameter
Description
nameThe user's nickname. If no name is passed the function will return the name of the currents user's secured directory.
format1 = relative path: dir/...
2 = absolute path: /dir/...
3 = root path: SERVERROOT/dir/...
createCreate directory if it doesn't exist.

Get absolute path of specific user's directory

$USER->directory('achim', 2)
RETURN: '/data/user/achim/'

Get name of current user's secure directory

$USER->directory()
RETURN: '/var/.../.../data/user/test/'

Get all secured txt-files

$FILE->collect($USER->directory(), 3, 'txt')
Array ( [data/user/test/] => Array ( [0] => test.txt [1] => test1.txt [2] => test2.txt )[data/user/test/testdir/] => Array ( [0] => test.txt ))