| @@ 823-829 (lines=7) @@ | ||
| 820 | * @return \OCP\Files\Folder|null |
|
| 821 | */ |
|
| 822 | public function getUserFolder($userId = null) { |
|
| 823 | if ($userId === null) { |
|
| 824 | $user = $this->getUserSession()->getUser(); |
|
| 825 | if (!$user) { |
|
| 826 | return null; |
|
| 827 | } |
|
| 828 | $userId = $user->getUID(); |
|
| 829 | } |
|
| 830 | $root = $this->getRootFolder(); |
|
| 831 | return $root->getUserFolder($userId); |
|
| 832 | } |
|
| @@ 1102-1109 (lines=8) @@ | ||
| 1099 | * @return \OCP\ICertificateManager | null if $uid is null and no user is logged in |
|
| 1100 | */ |
|
| 1101 | public function getCertificateManager($userId = '') { |
|
| 1102 | if ($userId === '') { |
|
| 1103 | $userSession = $this->getUserSession(); |
|
| 1104 | $user = $userSession->getUser(); |
|
| 1105 | if (is_null($user)) { |
|
| 1106 | return null; |
|
| 1107 | } |
|
| 1108 | $userId = $user->getUID(); |
|
| 1109 | } |
|
| 1110 | return new CertificateManager($userId, new View(), $this->getConfig()); |
|
| 1111 | } |
|
| 1112 | ||