This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/src/Api/Jobs/UserJobs/GetUserJob.php

28 lines
497 B
PHP
Raw Normal View History

2014-05-04 12:45:26 +02:00
<?php
class GetUserJob extends AbstractJob
2014-05-04 12:45:26 +02:00
{
protected $userRetriever;
public function __construct()
{
$this->userRetriever = new UserRetriever($this);
}
2014-05-04 12:45:26 +02:00
public function execute()
{
return $this->userRetriever->retrieve();
2014-05-04 12:45:26 +02:00
}
public function getRequiredArguments()
2014-05-12 10:31:34 +02:00
{
return $this->userRetriever->getRequiredArguments();
2014-05-12 10:31:34 +02:00
}
public function getRequiredPrivileges()
2014-05-04 12:45:26 +02:00
{
2014-05-04 16:27:15 +02:00
return new Privilege(
2014-05-04 12:45:26 +02:00
Privilege::ViewUser,
Access::getIdentity($this->userRetriever->retrieve()));
2014-05-04 12:45:26 +02:00
}
}