aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/ProfileModel.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-07-03 08:15:36 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2023-07-03 08:15:36 +0000
commit3d6e9f573c39cadc3af2f3eff89eee2c4af68b34 (patch)
treeaedd856e484c2d5f90fe5f1b52a2b5e2d522e22d /lib/classes/ProfileModel.php
parent9a720a69d9052a865163054c133b916782a8c529 (diff)
fix errors and warnings, fixes #2803
Closes #2803 Merge request studip/studip!1890
Diffstat (limited to 'lib/classes/ProfileModel.php')
-rw-r--r--lib/classes/ProfileModel.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/classes/ProfileModel.php b/lib/classes/ProfileModel.php
index 663d8ab..6827ba6 100644
--- a/lib/classes/ProfileModel.php
+++ b/lib/classes/ProfileModel.php
@@ -54,7 +54,10 @@ class ProfileModel
*/
public function getHomepageVisibilities()
{
- $visibilities = get_local_visibility_by_id($this->current_user->user_id, 'homepage');
+ $visibilities = get_local_visibility_by_id(
+ $this->current_user ? $this->current_user->id : null,
+ 'homepage'
+ );
if (is_array(json_decode($visibilities, true))) {
return json_decode($visibilities, true);
}