| @@ 754-760 (lines=7) @@ | ||
| 751 | * @return \OCP\Files\Folder|null |
|
| 752 | */ |
|
| 753 | public function getUserFolder($userId = null) { |
|
| 754 | if ($userId === null) { |
|
| 755 | $user = $this->getUserSession()->getUser(); |
|
| 756 | if (!$user) { |
|
| 757 | return null; |
|
| 758 | } |
|
| 759 | $userId = $user->getUID(); |
|
| 760 | } |
|
| 761 | $root = $this->getRootFolder(); |
|
| 762 | return $root->getUserFolder($userId); |
|
| 763 | } |
|
| @@ 1017-1024 (lines=8) @@ | ||
| 1014 | * @return \OCP\ICertificateManager | null if $uid is null and no user is logged in |
|
| 1015 | */ |
|
| 1016 | public function getCertificateManager($userId = '') { |
|
| 1017 | if ($userId === '') { |
|
| 1018 | $userSession = $this->getUserSession(); |
|
| 1019 | $user = $userSession->getUser(); |
|
| 1020 | if (is_null($user)) { |
|
| 1021 | return null; |
|
| 1022 | } |
|
| 1023 | $userId = $user->getUID(); |
|
| 1024 | } |
|
| 1025 | return new CertificateManager($userId, new View(), $this->getConfig()); |
|
| 1026 | } |
|
| 1027 | ||