diff --git a/appinfo/info.xml b/appinfo/info.xml
index ecb5648..a88ea50 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -4,7 +4,7 @@
Preferred Providers
Allow nextcloud to request user accounts
- 1.13.0
+ 1.13.1
agpl
John Molakvoæ
Preferred_Providers
diff --git a/js/users-management.js b/js/users-management.js
index a8ceaa8..1306658 100644
--- a/js/users-management.js
+++ b/js/users-management.js
@@ -1,5 +1,4 @@
$(document).ready(function() {
-
sendEmail = function(event) {
var userId = event.target.closest('div[data-id]').dataset.id;
var button = event.target.parentElement;
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 032f883..39cd40d 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -28,6 +28,7 @@
use OCA\Preferred_Providers\Hook\LoginHook;
use OCA\Preferred_Providers\Notification\Notifier;
use OCP\AppFramework\App;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IServerContainer;
use OCP\Util;
@@ -36,13 +37,18 @@ class Application extends App {
public function __construct() {
parent::__construct(self::APP_ID);
- }
- public function register() {
- $this->registerNotifier($this->getContainer()->getServer());
- $this->getContainer()->query(LoginHook::class)->register();
+ $container = $this->getContainer();
+ $server = $container->query(IServerContainer::class);
+
+ $this->registerNotifier($server);
+
+ /** @var LoginHook */
+ $loginHook = $container->query(LoginHook::class);
+ $loginHook->register();
- $eventDispatcher = $this->getContainer()->getServer()->getEventDispatcher();
+ /** @var IEventDispatcher */
+ $eventDispatcher = $server->query(IEventDispatcher::class);
$eventDispatcher->addListener('OC\Settings\Users::loadAdditionalScripts',
function () {
Util::addScript(self::APP_ID, 'users-management');
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index 63abeee..0fb2f26 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -152,7 +152,7 @@ public function resetToken(): DataResponse {
* @return DataResponse
* @throws OCSNotFoundException
*/
- public function setGroups(array $groups, string $for = 'all'): DataResponse {
+ public function setGroups(array $groups = [], string $for = 'all'): DataResponse {
foreach ($groups as $groupId) {
if (!$this->groupManager->groupExists($groupId)) {
throw new OCSNotFoundException($groupId . ' does not exists');