ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.assFileUploadStakeholder.php
Go to the documentation of this file.
1 <?php
2 
20 
25 {
26  private int $current_user;
27 
28  public function __construct()
29  {
30  global $DIC;
31  $anonymous = defined(
32  'ANONYMOUS_USER_ID'
33  ) ? ANONYMOUS_USER_ID : 13;
34  $this->current_user = (int) ($DIC->isDependencyAvailable('user') ? $DIC->user()->getId() : $anonymous);
35  }
36 
37  public function getId(): string
38  {
39  return 'qpl_file_upload';
40  }
41 
42  public function getOwnerOfNewResources(): int
43  {
44  return $this->current_user;
45  }
46 
47 }
const ANONYMOUS_USER_ID
Definition: constants.php:27
global $DIC
Definition: feed.php:28
__construct()
Constructor must not have any parameters.