ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUsersGalleryUserImpl.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function __construct(
24 protected ilObjUser $aggregated_user,
25 protected string $public_name,
26 protected string $sortable_public_name
27 ) {
28 }
29
30 public function hasPublicProfile(): bool
31 {
32 global $DIC;
33
34 return (
35 (!$DIC->user()->isAnonymous() && $this->aggregated_user->getPref('public_profile') === 'y') ||
36 $this->aggregated_user->getPref('public_profile') === 'g'
37 );
38 }
39
40 public function getPublicName(): string
41 {
42 return $this->public_name;
43 }
44
45 public function getSortablePublicName(): string
46 {
47 return $this->sortable_public_name;
48 }
49
50 public function getAggregatedUser(): ilObjUser
51 {
52 return $this->aggregated_user;
53 }
54}
User class.
__construct(protected ilObjUser $aggregated_user, protected string $public_name, protected string $sortable_public_name)
global $DIC
Definition: shib_login.php:26