blob: 5dcee366e53f6b0cc87d14bf39f3db574f271d00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\User\Backend;
/**
* @since 28.0.0
*/
interface IProvideEnabledStateBackend {
/**
* @since 28.0.0
*
* @param callable():bool $queryDatabaseValue A callable to query the enabled state from database
*/
public function isUserEnabled(string $uid, callable $queryDatabaseValue): bool;
/**
* @since 28.0.0
*
* @param callable():bool $queryDatabaseValue A callable to query the enabled state from database
* @param callable(bool):void $setDatabaseValue A callable to set the enabled state in the database.
*/
public function setUserEnabled(string $uid, bool $enabled, callable $queryDatabaseValue, callable $setDatabaseValue): bool;
/**
* Get the list of disabled users, to merge with the ones disabled in database
*
* @since 28.0.0
* @since 30.0.0 $search parameter added
*
* @return string[]
*/
public function getDisabledUserList(?int $limit = null, int $offset = 0, string $search = ''): array;
}
|