new: [user] Added `notifyAdmin` behavior

pull/121/head
Sami Mokaddem 2022-10-27 10:14:09 +02:00
parent 1919e6703f
commit d0119b2dba
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 4 additions and 1 deletions

View File

@ -24,6 +24,9 @@ class UsersTable extends AppTable
$this->addBehavior('Timestamp');
$this->addBehavior('UUID');
$this->addBehavior('AuditLog');
$this->addBehavior('NotifyAdmins', [
'fields' => ['role_id', 'individual_id', 'organisation_id', 'disabled', 'modified'],
]);
$this->initAuthBehaviors();
$this->belongsTo(
'Individuals',
@ -221,7 +224,7 @@ class UsersTable extends AppTable
{
if (!empty(Configure::read('keycloak'))) {
$success = $this->handleUserUpdate($user);
return $success;
// return $success;
}
return true;
}