Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PersonalSettings.php « Settings « lib - github.com/pierre-alain-b/rainloop-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ec188c0f971bcd8dfa7d6ff6d7c28982adc56b57 (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
<?php
namespace OCA\RainLoop\Settings;

use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;

class PersonalSettings {
	private $config;

	public function __construct(IConfig $config) {
		$this->config = $config;
	}

	public function getForm() {
		$uid = \OC::$server->getUserSession()->getUser()->getUID();

		$keys = [
			'rainloop-email',
			'rainloop-password'
		];

		$parameters = [];
		foreach ($keys as $k) {
			$v = $this->config->getUserValue($uid, 'rainloop', $k);
			$parameters[$k] = $v;
		}

		return new TemplateResponse('rainloop', 'personal_settings', $parameters, '');
	}

}