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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-22 12:46:37 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-23 14:45:09 +0300
commit1cf61baa41c5ae8229f92a2132938e5787c013e9 (patch)
tree792e9c8f9fffcacd0f46a4f66fa5bf34225a242e
parent5e8f0a893d33fe35c0a41a97142533ef67e50dc5 (diff)
Fix "Call to a member function getUID() on boolean" in Crypt
-rw-r--r--apps/encryption/lib/crypto/crypt.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php
index f3cf38fb96c..0945325e003 100644
--- a/apps/encryption/lib/crypto/crypt.php
+++ b/apps/encryption/lib/crypto/crypt.php
@@ -49,7 +49,7 @@ class Crypt {
*/
private $logger;
/**
- * @var IUser
+ * @var string
*/
private $user;
/**
@@ -64,7 +64,7 @@ class Crypt {
*/
public function __construct(ILogger $logger, IUserSession $userSession, IConfig $config) {
$this->logger = $logger;
- $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser() : false;
+ $this->user = $userSession && $userSession->isLoggedIn() ? $userSession->getUser()->getUID() : '"no user given"';
$this->config = $config;
}
@@ -79,7 +79,7 @@ class Crypt {
$res = $this->getOpenSSLPKey();
if (!$res) {
- $log->error("Encryption Library couldn't generate users key-pair for {$this->user->getUID()}",
+ $log->error("Encryption Library couldn't generate users key-pair for {$this->user}",
['app' => 'encryption']);
if (openssl_error_string()) {
@@ -98,7 +98,7 @@ class Crypt {
'privateKey' => $privateKey
];
}
- $log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.' . $this->user->getUID(),
+ $log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.' . $this->user,
['app' => 'encryption']);
if (openssl_error_string()) {
$log->error('Encryption Library:' . openssl_error_string(),