experimenting with changeUser hook

This commit is contained in:
Alexander Vassilevski 2021-02-21 19:29:12 -08:00
parent f9e9ba3eb8
commit 646ff2a029
1 changed files with 14 additions and 1 deletions

View File

@ -21,6 +21,8 @@ class UserHooks {
'\OC\User', 'preDelete', $this->deleteUserCB());
$this->userManager->listen(
'\OC\User', 'postSetPassword', $this->updateEmailPasswordCB());
$this->userManager->listen(
'\OC\User', 'changeUser', $this->changeUserCB());
}
private function createUserCB() {
return function (\OC\User\User $user, string $password) {
@ -74,7 +76,18 @@ class UserHooks {
$this->logger->warning(
"Updated glesys password for account: " . $email,
$this->logContext);
else $this->logger->error("Error updating mail password for account" . $uid);
else $this->logger->error(
"Error updating mail password for account" . $uid);
};
}
private function changeUserCB() {
return function (\OC\User\User $user, $feature, $value) {
$this->logger->warning(
"User: " . print_r($user, 1), $this->logContext);
$this->logger->warning(
"Feature: " . print_r($feature, 1), $this->logContext);
$this->logger->warning(
"Value: " . print_r($value, 1), $this->logContext);
};
}
private function createImapFolders($user_data) {