summaryrefslogtreecommitdiffstatshomepage
path: root/www/profile.php
diff options
context:
space:
mode:
authorGravatar Tom Willemse2024-06-10 21:09:15 -0700
committerGravatar Tom Willemse2024-06-10 21:09:15 -0700
commitb5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1 (patch)
tree6397c4fbcd147c7715f231f336107f8e13802cec /www/profile.php
parent53b174a3236d89e1528ea663584f6bbca3c24c53 (diff)
downloadscuttle-b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1.tar.gz
scuttle-b5ac1fa2a33ae046fa785d9938dcd0d5274b7ce1.zip
Make sure to check users for being false
Diffstat (limited to 'www/profile.php')
-rw-r--r--www/profile.php5
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'] = '';
}
}