ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilUsersGalleryUserImpl.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 {
22  public function __construct(
23  protected ilObjUser $aggregated_user,
24  protected string $public_name,
25  protected string $sortable_public_name
26  ) {
27  }
28 
29  public function hasPublicProfile(): bool
30  {
31  global $DIC;
32 
33  return (
34  (!$DIC->user()->isAnonymous() && $this->aggregated_user->getPref('public_profile') === 'y') ||
35  $this->aggregated_user->getPref('public_profile') === 'g'
36  );
37  }
38 
39  public function getPublicName(): string
40  {
41  return $this->public_name;
42  }
43 
44  public function getSortablePublicName(): string
45  {
46  return $this->sortable_public_name;
47  }
48 
49  public function getAggregatedUser(): ilObjUser
50  {
51  return $this->aggregated_user;
52  }
53 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(protected ilObjUser $aggregated_user, protected string $public_name, protected string $sortable_public_name)
global $DIC
Definition: shib_login.php:25