summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php25
-rw-r--r--apps/provisioning_api/tests/Controller/UsersControllerTest.php21
2 files changed, 1 insertions, 45 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index ca78297a1a6..6e34fe53eb3 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -31,23 +31,20 @@ namespace OCA\Provisioning_API\Controller;
use OC\Accounts\AccountManager;
use OC\Settings\Mailer\NewUserMailHelper;
-use \OC_Helper;
+use OC_Helper;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCSController;
-use OCP\Defaults;
use OCP\Files\NotFoundException;
use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IRequest;
-use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\L10N\IFactory;
-use OCP\Mail\IMailer;
class UsersController extends OCSController {
@@ -63,14 +60,6 @@ class UsersController extends OCSController {
private $accountManager;
/** @var ILogger */
private $logger;
- /** @var string */
- private $fromMailAddress;
- /** @var IURLGenerator */
- private $urlGenerator;
- /** @var IMailer */
- private $mailer;
- /** @var Defaults */
- private $defaults;
/** @var IFactory */
private $l10nFactory;
/** @var NewUserMailHelper */
@@ -85,10 +74,6 @@ class UsersController extends OCSController {
* @param IUserSession $userSession
* @param AccountManager $accountManager
* @param ILogger $logger
- * @param string $fromMailAddress
- * @param IURLGenerator $urlGenerator
- * @param IMailer $mailer
- * @param Defaults $defaults
* @param IFactory $l10nFactory
* @param NewUserMailHelper $newUserMailHelper
*/
@@ -100,10 +85,6 @@ class UsersController extends OCSController {
IUserSession $userSession,
AccountManager $accountManager,
ILogger $logger,
- $fromMailAddress,
- IURLGenerator $urlGenerator,
- IMailer $mailer,
- Defaults $defaults,
IFactory $l10nFactory,
NewUserMailHelper $newUserMailHelper) {
parent::__construct($appName, $request);
@@ -114,10 +95,6 @@ class UsersController extends OCSController {
$this->userSession = $userSession;
$this->accountManager = $accountManager;
$this->logger = $logger;
- $this->fromMailAddress = $fromMailAddress;
- $this->urlGenerator = $urlGenerator;
- $this->mailer = $mailer;
- $this->defaults = $defaults;
$this->l10nFactory = $l10nFactory;
$this->newUserMailHelper = $newUserMailHelper;
}
diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
index 766c92c9648..57e1d2eac66 100644
--- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php
+++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php
@@ -70,12 +70,6 @@ class UsersControllerTest extends TestCase {
protected $accountManager;
/** @var IRequest|PHPUnit_Framework_MockObject_MockObject */
protected $request;
- /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */
- private $urlGenerator;
- /** @var IMailer|PHPUnit_Framework_MockObject_MockObject */
- private $mailer;
- /** @var Defaults|PHPUnit_Framework_MockObject_MockObject */
- private $defaults;
/** @var IFactory|PHPUnit_Framework_MockObject_MockObject */
private $l10nFactory;
/** @var NewUserMailHelper|PHPUnit_Framework_MockObject_MockObject */
@@ -91,9 +85,6 @@ class UsersControllerTest extends TestCase {
$this->logger = $this->createMock(ILogger::class);
$this->request = $this->createMock(IRequest::class);
$this->accountManager = $this->createMock(AccountManager::class);
- $this->urlGenerator = $this->createMock(IURLGenerator::class);
- $this->mailer = $this->createMock(IMailer::class);
- $this->defaults = $this->createMock(Defaults::class);
$this->l10nFactory = $this->createMock(IFactory::class);
$this->newUserMailHelper = $this->createMock(NewUserMailHelper::class);
@@ -107,10 +98,6 @@ class UsersControllerTest extends TestCase {
$this->userSession,
$this->accountManager,
$this->logger,
- 'test@example.org',
- $this->urlGenerator,
- $this->mailer,
- $this->defaults,
$this->l10nFactory,
$this->newUserMailHelper
])
@@ -2664,10 +2651,6 @@ class UsersControllerTest extends TestCase {
$this->userSession,
$this->accountManager,
$this->logger,
- '',
- $this->urlGenerator,
- $this->mailer,
- $this->defaults,
$this->l10nFactory,
$this->newUserMailHelper
])
@@ -2728,10 +2711,6 @@ class UsersControllerTest extends TestCase {
$this->userSession,
$this->accountManager,
$this->logger,
- '',
- $this->urlGenerator,
- $this->mailer,
- $this->defaults,
$this->l10nFactory,
$this->newUserMailHelper
])