| @@ 1313-1319 (lines=7) @@ | ||
| 1310 | * @return \OCP\Files\Folder|null |
|
| 1311 | */ |
|
| 1312 | public function getUserFolder($userId = null) { |
|
| 1313 | if ($userId === null) { |
|
| 1314 | $user = $this->getUserSession()->getUser(); |
|
| 1315 | if (!$user) { |
|
| 1316 | return null; |
|
| 1317 | } |
|
| 1318 | $userId = $user->getUID(); |
|
| 1319 | } |
|
| 1320 | $root = $this->getRootFolder(); |
|
| 1321 | return $root->getUserFolder($userId); |
|
| 1322 | } |
|
| @@ 1591-1598 (lines=8) @@ | ||
| 1588 | * @return \OCP\ICertificateManager | null if $uid is null and no user is logged in |
|
| 1589 | */ |
|
| 1590 | public function getCertificateManager($userId = '') { |
|
| 1591 | if ($userId === '') { |
|
| 1592 | $userSession = $this->getUserSession(); |
|
| 1593 | $user = $userSession->getUser(); |
|
| 1594 | if (is_null($user)) { |
|
| 1595 | return null; |
|
| 1596 | } |
|
| 1597 | $userId = $user->getUID(); |
|
| 1598 | } |
|
| 1599 | return new CertificateManager( |
|
| 1600 | $userId, |
|
| 1601 | new View(), |
|