diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-18 20:52:16 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-20 14:57:20 +0100 |
commit | f16ddef96a0446fdd6f8e926f75055cebc1f20cf (patch) | |
tree | 66070c1e1576a0eb89e8b73e5328535c2d5d2aac /apps | |
parent | aeb89947a2bddb1db10426538afaccdc141c059e (diff) | |
download | nextcloud-server-f16ddef96a0446fdd6f8e926f75055cebc1f20cf.tar.gz nextcloud-server-f16ddef96a0446fdd6f8e926f75055cebc1f20cf.zip |
React on OC_User::changeUser hook and update the user's vcard
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/hookmanager.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/dav/lib/hookmanager.php b/apps/dav/lib/hookmanager.php index 7902bf31459..d2199bec598 100644 --- a/apps/dav/lib/hookmanager.php +++ b/apps/dav/lib/hookmanager.php @@ -54,6 +54,10 @@ class HookManager { 'post_deleteUser', $this, 'postDeleteUser'); + Util::connectHook('OC_User', + 'changeUser', + $this, + 'changeUser'); } public function postCreateUser($params) { @@ -64,6 +68,7 @@ class HookManager { public function preDeleteUser($params) { $this->usersToDelete[$params['uid']] = $this->userManager->get($params['uid']); } + public function postDeleteUser($params) { $uid = $params['uid']; if (isset($this->usersToDelete[$uid])){ @@ -71,4 +76,8 @@ class HookManager { } } + public function changeUser($params) { + $user = $params['user']; + $this->syncService->updateUser($user); + } } |