Properties

$repositoriesCache

$repositoriesCache : array

Type

array

$usersCache

$usersCache : array

Type

array

$userParametersCache

$userParametersCache : array

Type

array

Methods

getUserById()

getUserById(string  $userId, boolean  $checkExists = true) : \Pydio\Core\Model\UserInterface

Parameters

string $userId
boolean $checkExists

Throws

\Pydio\Core\Exception\UserNotFoundException

Returns

\Pydio\Core\Model\UserInterface

updateUser()

updateUser(  $userObject, string  $scope = "user") 

Parameters

$userObject

UserInterface

string $scope

getRepositoryWithPermission()

getRepositoryWithPermission(\Pydio\Core\Model\UserInterface  $user, string  $repositoryId) : null|\Pydio\Core\Model\RepositoryInterface

Parameters

\Pydio\Core\Model\UserInterface $user
string $repositoryId

Throws

\Pydio\Core\Exception\WorkspaceNotFoundException
\Pydio\Core\Exception\WorkspaceForbiddenException

Returns

null|\Pydio\Core\Model\RepositoryInterface

getRepositoriesForUser()

getRepositoriesForUser(\Pydio\Core\Model\UserInterface  $user, boolean  $includeShared = true, boolean  $details = false, boolean  $labelsOnly = false) : array<mixed,\Pydio\Core\Model\RepositoryInterface>

Parameters

\Pydio\Core\Model\UserInterface $user
boolean $includeShared
boolean $details
boolean $labelsOnly

Returns

array<mixed,\Pydio\Core\Model\RepositoryInterface>

invalidateCache()

invalidateCache() 

usersEnabled()

usersEnabled() : boolean

Whether the whole users management system is enabled or not.

Returns

boolean

changePasswordEnabled()

changePasswordEnabled() : boolean

Whether the current auth driver supports password update or not

Returns

boolean

filterUserSensitivity()

filterUserSensitivity(  $user) : string

Return user to lower case if ignoreUserCase

Parameters

$user

Returns

string

ignoreUserCase()

ignoreUserCase() : boolean

Get config to knwo whether we should ignore user case

Returns

boolean

getLogoutAddress()

getLogoutAddress() : string

If the auth driver implementation has a logout redirect URL.

Returns

string

userExists()

userExists(String  $userId, String  $mode = "r") : boolean

Use driver implementation to check whether the user exists or not.

Parameters

String $userId
String $mode

"r" or "w"

Returns

boolean

isReservedUserId()

isReservedUserId(String  $username) : boolean

Make sure a user id is not reserved for low-level tasks (currently "guest" and "shared").

Parameters

String $username

Returns

boolean

checkPassword()

checkPassword(  $userId,   $userPass, boolean  $cookieString = false) : boolean|void

Check a password

Parameters

$userId
$userPass
boolean $cookieString

Throws

\Pydio\Core\Exception\UserNotFoundException

Returns

boolean|void

updatePassword()

updatePassword(  $userId,   $userPass) : boolean

Update the password in the auth driver implementation.

Parameters

$userId
$userPass

Throws

\Exception

Returns

boolean

createUser()

createUser(  $userId,   $userPass, boolean  $isAdmin = false, boolean  $isHidden = false) : \Pydio\Core\Model\UserInterface

Create a user

Parameters

$userId
$userPass
boolean $isAdmin
boolean $isHidden

Throws

\Exception

Returns

\Pydio\Core\Model\UserInterface

countAdminUsers()

countAdminUsers() : integer|void

Detect the number of admin users

Returns

integer|void

deleteUser()

deleteUser(  $userId) : boolean

Delete a user in the auth/conf driver impl

Parameters

$userId

Returns

boolean

listChildrenGroups()

listChildrenGroups(string  $baseGroup = "/") : array<mixed,string>

List children groups of current base

Parameters

string $baseGroup

Returns

array<mixed,string>

createGroup()

createGroup(  $baseGroup,   $groupName,   $groupLabel) 

Create a new group at the given path

Parameters

$baseGroup
$groupName
$groupLabel

Throws

\Exception

deleteGroup()

deleteGroup(  $baseGroup,   $groupName) 

Delete group by name

Parameters

$baseGroup
$groupName

getChildrenUsers()

getChildrenUsers(  $parentUserId) : array<mixed,\Pydio\Conf\Core\AbstractUser>

Count the number of children a given user has already created

Parameters

$parentUserId

Returns

array<mixed,\Pydio\Conf\Core\AbstractUser>

countUsersForRepository()

countUsersForRepository(\Pydio\Core\Model\ContextInterface  $ctx,   $repositoryId, boolean  $details = false, boolean  $admin = false) : array|integer

Count the number of users who have either read or write access to a repository

Parameters

\Pydio\Core\Model\ContextInterface $ctx
$repositoryId
boolean $details
boolean $admin

True if called in an admin context

Returns

array|integer

listUsers()

listUsers(string  $baseGroup = "/", null  $regexp = null,   $offset = -1,   $limit = -1, boolean  $cleanLosts = true, boolean  $recursive = true, null  $countCallback = null, null  $loopCallback = null) : array<mixed,\Pydio\Core\Model\UserInterface>

List users with a specific filter

Parameters

string $baseGroup
null $regexp
$offset
$limit
boolean $cleanLosts
boolean $recursive
null $countCallback
null $loopCallback

Returns

array<mixed,\Pydio\Core\Model\UserInterface>

browseUsersGroupsWithCallback()

browseUsersGroupsWithCallback(string  $baseGroup, callable  $userCallback, boolean  $recursive = false, callable  $groupCallback = null, string  $baseGroupLabel = null) 

Scroll every registered users and apply a callback

Parameters

string $baseGroup

Where to start from

callable $userCallback

Apply this callback to every user found. Parameters are (userId, userGroup, index, total) where index/total are relative in the current group.

boolean $recursive

Browse all subgroups and their children

callable $groupCallback

Apply this callback to every group found. Parameters are (groupPath, groupLabel). Generally for logging purpose.

string $baseGroupLabel

Pass label of the current group, used by groupCallback.

findUserPage()

findUserPage(  $baseGroup,   $userLogin,   $usersPerPage, integer  $offset) : integer

Depending on the plugin, tried to compute the actual page where a given user can be located

Parameters

$baseGroup
$userLogin
$usersPerPage
integer $offset

Returns

integer

authSupportsPagination()

authSupportsPagination() : boolean

Whether the current auth driver supports paginated listing

Returns

boolean

authCountUsers()

authCountUsers(string  $baseGroup = "/", string  $regexp = "", null  $filterProperty = null, null  $filterValue = null, boolean  $recursive = true) : integer

Count the total number of users inside a group (recursive).

Regexp can be used to limit the users IDs with a specific expression Property can be used for basic filtering, either on "parent" or "admin".

Parameters

string $baseGroup
string $regexp
null $filterProperty

Can be "parent" or "admin"

null $filterValue

Can be a string, or constants AJXP_FILTER_EMPTY / AJXP_FILTER_NOT_EMPTY

boolean $recursive

Returns

integer

getAuthScheme()

getAuthScheme(  $userName) : String

Makes a correspondance between a user and its auth scheme, for multi auth

Parameters

$userName

Returns

String

driverSupportsAuthSchemes()

driverSupportsAuthSchemes() : boolean

Check if auth implementation supports schemes detection

Returns

boolean

getUsersExposedParameters()

getUsersExposedParameters() : array

Get parameters with scope='user' expose='true' attributes.

Cached in plugin service.

Returns

array —

Array of [PLUGIN_ID=>id, NAME=>name] objects.

getUserPersonalParameter()

getUserPersonalParameter(string  $parameterName, \Pydio\Core\Model\UserInterface|string  $userIdOrObject, string  $pluginId = "core.conf", null  $defaultValue = null) : mixed

Parameters

string $parameterName

Plugin parameter name

\Pydio\Core\Model\UserInterface|string $userIdOrObject
string $pluginId

Plugin name, core.conf by default

null $defaultValue

Returns

mixed

setInCache()

setInCache(string  $userId, array<mixed,\Pydio\Core\Model\RepositoryInterface>  $repoList) 

Parameters

string $userId
array<mixed,\Pydio\Core\Model\RepositoryInterface> $repoList

getFromCaches()

getFromCaches(  $userId) : mixed|null|array<mixed,\Pydio\Core\Model\RepositoryInterface>

Parameters

$userId

Returns

mixed|null|array<mixed,\Pydio\Core\Model\RepositoryInterface>

storeWebdavDigestForUser()

storeWebdavDigestForUser(\Pydio\Core\Model\UserInterface  $userObject, string  $password) 

Store the HA1 digest for Digest Authentication in WebDAV

Parameters

\Pydio\Core\Model\UserInterface $userObject
string $password

Throws

\Pydio\Core\Exception\UserNotFoundException