UserHooks   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteUser() 0 5 1
1
<?php
2
/**
3
 * Audio Player
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the LICENSE.md file.
7
 *
8
 * @author Marcel Scherello <[email protected]>
9
 * @copyright 2016-2019 Marcel Scherello
10
 */
11
 
12
namespace OCA\audioplayer\Hooks;
13
use OCA\audioplayer\Controller;
14
15
class UserHooks {
16
	public static function deleteUser($params) {
17
		$userId = $params['uid'];
18
		$app = new \OCA\audioplayer\AppInfo\Application();
19
        	$container = $app->getContainer();
20
        $container->query(\OCA\audioplayer\Controller\DbController::class)->resetMediaLibrary($userId, null, true);
21
	}    
22
}
23