diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 12:56:14 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 12:56:14 +0200 |
commit | e8b12a3c2c2538ba7df7b5b21f126cb7cd425050 (patch) | |
tree | ebf320e9db5358ec859ff5dabf0aee5012171223 /apps | |
parent | db48a937cf05a63e9b6b6f1d0d9fed3017759092 (diff) | |
parent | e0a56317fae522ff570752341687811da8ca42fc (diff) | |
download | nextcloud-server-e8b12a3c2c2538ba7df7b5b21f126cb7cd425050.tar.gz nextcloud-server-e8b12a3c2c2538ba7df7b5b21f126cb7cd425050.zip |
Merge pull request #19970 from owncloud/encryption-getuidonboolean
Fix "Call to a member function getUID() on boolean" in Crypt
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/lib/crypto/crypt.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/encryption/lib/crypto/crypt.php b/apps/encryption/lib/crypto/crypt.php index c55fb00f838..53a78c216a3 100644 --- a/apps/encryption/lib/crypto/crypt.php +++ b/apps/encryption/lib/crypto/crypt.php @@ -53,7 +53,7 @@ class Crypt { */ private $logger; /** - * @var IUser + * @var string */ private $user; /** @@ -73,7 +73,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; $this->supportedKeyFormats = ['hash', 'password']; } @@ -89,7 +89,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()) { @@ -108,7 +108,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(), |