diff options
author | Tom Willemse | 2024-06-11 00:13:48 -0700 |
---|---|---|
committer | Tom Willemse | 2024-06-11 00:13:48 -0700 |
commit | a959a69a1dd781caa33829db161859c88455911d (patch) | |
tree | ac0db2fa23482c6ef5caedd21079bf2f8c9be368 /www/profile.php | |
parent | 9bcc5827388491d37591a86a175f63fa9cd38d41 (diff) | |
parent | 85cca718e308779a56dbf302140ce9088fc0727a (diff) | |
download | scuttle-a959a69a1dd781caa33829db161859c88455911d.tar.gz scuttle-a959a69a1dd781caa33829db161859c88455911d.zip |
Merge branch 'sqlite-fixes' into oni
Diffstat (limited to 'www/profile.php')
-rw-r--r-- | www/profile.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/www/profile.php b/www/profile.php index 6a4222e..88e58e5 100644 --- a/www/profile.php +++ b/www/profile.php @@ -130,10 +130,11 @@ if (POST_SUBMITTED!='' && $currentUser->getId() == $userid) { } } $userinfo = $userservice->getObjectUserByUsername($user); - $tplVars['privateKey'] = $userinfo->getPrivateKey(true); - if ($userservice->isPrivateKeyValid($userinfo->getPrivateKey())) { + if ($userinfo && $userservice->isPrivateKeyValid($userinfo->getPrivateKey())) { + $tplVars['privateKey'] = $userinfo->getPrivateKey(true); $tplVars['privateKeyIsEnabled'] = 'checked="checked"'; } else { + $tplVars['privateKey'] = null; $tplVars['privateKeyIsEnabled'] = ''; } } |