diff options
author | 2024-06-10 21:09:15 -0700 | |
---|---|---|
committer | 2024-06-10 21:09:15 -0700 | |
commit | b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1 (patch) | |
tree | 6397c4fbcd147c7715f231f336107f8e13802cec /www | |
parent | 53b174a3236d89e1528ea663584f6bbca3c24c53 (diff) | |
download | scuttle-b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1.tar.gz scuttle-b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1.zip |
Make sure to check users for being false
Diffstat (limited to 'www')
-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'] = ''; } } |