mirror of
https://github.com/nextcloud/server.git
synced 2025-01-30 22:37:01 +00:00
c1555fc33e
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
24 lines
592 B
PHP
24 lines
592 B
PHP
<?php
|
|
/**
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
namespace OCA\Files_External\Config;
|
|
|
|
class UserPlaceholderHandler extends UserContext implements IConfigHandler {
|
|
use SimpleSubstitutionTrait;
|
|
|
|
/**
|
|
* @param mixed $optionValue
|
|
* @return mixed the same type as $optionValue
|
|
* @since 16.0.0
|
|
*/
|
|
public function handle($optionValue) {
|
|
$this->placeholder = 'user';
|
|
$uid = $this->getUserId();
|
|
if ($uid === null) {
|
|
return $optionValue;
|
|
}
|
|
return $this->processInput($optionValue, $uid);
|
|
}
|
|
}
|