Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2622,11 +2622,6 @@
<code><![CDATA[setAppValue]]></code>
</DeprecatedMethod>
</file>
<file src="core/BackgroundJobs/GenerateMetadataJob.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/App/ListApps.php">
<LessSpecificImplementedReturnType>
<code><![CDATA[array]]></code>
Expand Down Expand Up @@ -2749,11 +2744,6 @@
<code><![CDATA[\OC_Util::tearDownFS()]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/Group/AddUser.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/Log/File.php">
<InvalidReturnStatement>
<code><![CDATA[[0]]]></code>
Expand All @@ -2779,9 +2769,6 @@
</UndefinedInterfaceMethod>
</file>
<file src="core/Command/Preview/ResetRenderedTexts.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
<InvalidReturnStatement>
<code><![CDATA[[]]]></code>
</InvalidReturnStatement>
Expand All @@ -2797,11 +2784,6 @@
<code><![CDATA[resetDelayForIP]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/TwoFactorAuth/Base.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/Upgrade.php">
<DeprecatedMethod>
<code><![CDATA[listen]]></code>
Expand Down Expand Up @@ -2848,41 +2830,6 @@
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/Disable.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/Enable.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/Info.php">
<DeprecatedClass>
<code><![CDATA[\OC_Util::setupFS($user->getUID())]]></code>
<code><![CDATA[\OC_Util::tearDownFS()]]></code>
</DeprecatedClass>
<DeprecatedMethod>
<code><![CDATA[\OC_Util::tearDownFS()]]></code>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/LastSeen.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/Profile.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/ResetPassword.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
</DeprecatedMethod>
</file>
<file src="core/Command/User/Setting.php">
<DeprecatedMethod>
<code><![CDATA[search]]></code>
Expand Down
2 changes: 1 addition & 1 deletion core/BackgroundJobs/GenerateMetadataJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected function run(mixed $argument): void {

$lastHandledUser = $this->appConfig->getValueString('core', 'metadataGenerationLastHandledUser', '');

$users = $this->userManager->search('');
$users = $this->userManager->searchDisplayName('');

// we'll only start timer once we have found a valid user to handle
// meaning NOW if we have not handled any user from a previous run
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Group/AddUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function completeArgumentValues($argumentName, CompletionContext $context
}

$members = array_map(static fn (IUser $user) => $user->getUID(), $group->searchUsers($context->getCurrentWord()));
$users = array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
$users = array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord()));
return array_diff($users, $members);
}
return [];
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Preview/ResetRenderedTexts.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private function deleteAvatars(OutputInterface $output, bool $dryMode): void {
}

private function getAvatarsToDelete(): \Iterator {
foreach ($this->userManager->search('') as $user) {
foreach ($this->userManager->searchDisplayName('') as $user) {
$avatar = $this->avatarManager->getAvatar($user->getUID());

if (!$avatar->isCustomAvatar()) {
Expand Down
2 changes: 1 addition & 1 deletion core/Command/TwoFactorAuth/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function completeArgumentValues($argumentName, CompletionContext $context
if ($argumentName === 'uid') {
return array_map(function (IUser $user) {
return $user->getUID();
}, $this->userManager->search($context->getCurrentWord(), 100));
}, $this->userManager->searchDisplayName($context->getCurrentWord(), 100));
}
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/Disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function completeArgumentValues($argumentName, CompletionContext $context
return array_map(
static fn (IUser $user) => $user->getUID(),
array_filter(
$this->userManager->search($context->getCurrentWord()),
$this->userManager->searchDisplayName($context->getCurrentWord()),
static fn (IUser $user) => $user->isEnabled()
)
);
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/Enable.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function completeArgumentValues($argumentName, CompletionContext $context
return array_map(
static fn (IUser $user) => $user->getUID(),
array_filter(
$this->userManager->search($context->getCurrentWord()),
$this->userManager->searchDisplayName($context->getCurrentWord()),
static fn (IUser $user) => !$user->isEnabled()
)
);
Expand Down
8 changes: 5 additions & 3 deletions core/Command/User/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
namespace OC\Core\Command\User;

use OC\Core\Command\Base;
use OC\Files\SetupManager;
use OCP\Files\NotFoundException;
use OCP\IGroupManager;
use OCP\IUser;
Expand All @@ -21,6 +22,7 @@ class Info extends Base {
public function __construct(
protected IUserManager $userManager,
protected IGroupManager $groupManager,
protected SetupManager $setupManager,
) {
parent::__construct();
}
Expand Down Expand Up @@ -82,8 +84,8 @@ private function formatLoginDate(int $timestamp): string {
* @return array
*/
protected function getStorageInfo(IUser $user): array {
\OC_Util::tearDownFS();
\OC_Util::setupFS($user->getUID());
$this->setupManager->tearDown();
$this->setupManager->setupForUser($user);
try {
$storage = \OC_Helper::getStorageInfo('/');
} catch (NotFoundException $e) {
Expand All @@ -105,7 +107,7 @@ protected function getStorageInfo(IUser $user): array {
*/
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'user') {
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord()));
}
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/LastSeen.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
*/
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'uid') {
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord()));
}
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private function getAllProfileProperties(IAccount $userAccount): array {
*/
public function completeArgumentValues($argumentName, CompletionContext $context): array {
if ($argumentName === 'uid') {
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord()));
}
if ($argumentName === 'key') {
$userId = $context->getWordAtIndex($context->getWordIndex() - 1);
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/ResetPassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
*/
public function completeArgumentValues($argumentName, CompletionContext $context) {
if ($argumentName === 'user') {
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->search($context->getCurrentWord()));
return array_map(static fn (IUser $user) => $user->getUID(), $this->userManager->searchDisplayName($context->getCurrentWord()));
}
return [];
}
Expand Down
Loading