Remove unnecessary event dispatcher
The event is already triggered in OC\User\User::triggerChange Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
38f8f7cbf4
commit
ca0b70eb2f
1 changed files with 1 additions and 2 deletions
|
@ -426,10 +426,9 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
$userSession->listen('\OC\User', 'logout', function () {
|
||||
\OC_Hook::emit('OC_User', 'logout', array());
|
||||
});
|
||||
$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) use ($dispatcher) {
|
||||
$userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value, $oldValue) {
|
||||
/** @var $user \OC\User\User */
|
||||
\OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value, 'old_value' => $oldValue));
|
||||
$dispatcher->dispatch('OCP\IUser::changeUser', new GenericEvent($user, ['feature' => $feature, 'oldValue' => $oldValue, 'value' => $value]));
|
||||
});
|
||||
return $userSession;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue