| @@ 791-797 (lines=7) @@ | ||
| 788 | * @return \OCP\Files\Folder|null |
|
| 789 | */ |
|
| 790 | public function getUserFolder($userId = null) { |
|
| 791 | if ($userId === null) { |
|
| 792 | $user = $this->getUserSession()->getUser(); |
|
| 793 | if (!$user) { |
|
| 794 | return null; |
|
| 795 | } |
|
| 796 | $userId = $user->getUID(); |
|
| 797 | } |
|
| 798 | $root = $this->getRootFolder(); |
|
| 799 | return $root->getUserFolder($userId); |
|
| 800 | } |
|
| @@ 1063-1070 (lines=8) @@ | ||
| 1060 | * @return \OCP\ICertificateManager | null if $uid is null and no user is logged in |
|
| 1061 | */ |
|
| 1062 | public function getCertificateManager($userId = '') { |
|
| 1063 | if ($userId === '') { |
|
| 1064 | $userSession = $this->getUserSession(); |
|
| 1065 | $user = $userSession->getUser(); |
|
| 1066 | if (is_null($user)) { |
|
| 1067 | return null; |
|
| 1068 | } |
|
| 1069 | $userId = $user->getUID(); |
|
| 1070 | } |
|
| 1071 | return new CertificateManager($userId, new View(), $this->getConfig()); |
|
| 1072 | } |
|
| 1073 | ||