Verified Commit 29470252 authored by dockx thibault's avatar dockx thibault
Browse files

:sparkles: Feat(userManagement) - adds a refresh of plugins

Adds a refresh of plugins on user lock.
Allowing zimbra to directly update its account status.

Adds BCC
Showing with 9 additions and 5 deletions
+9 -5
......@@ -27,11 +27,11 @@ class userManagement extends management
public static $columns = [
['ObjectTypeColumn', []],
['LinkColumn', ['attributes' => 'sn', 'label' => 'Last name']],
['LinkColumn', ['attributes' => 'givenName', 'label' => 'First name']],
['Column', ['attributes' => 'uid', 'label' => 'Login']],
['LinkColumn', ['attributes' => 'sn', 'label' => 'Last name']],
['LinkColumn', ['attributes' => 'givenName', 'label' => 'First name']],
['Column', ['attributes' => 'uid', 'label' => 'Login']],
['PropertiesColumn', ['label' => 'Properties']],
['ActionsColumn', ['label' => 'Actions']],
['ActionsColumn', ['label' => 'Actions']],
];
static function plInfo (): array
......@@ -93,6 +93,10 @@ class userManagement extends management
// Detect the password method and try to lock/unlock.
static::lockUser($action['subaction'], ($entry['userPassword'][0] ?? ''), $dn);
// Small procedure in order to re-open the user in order to trigger plugins to update accordingly.
$userObject = objects::open($dn, 'user');
$userObject->save();
}
}
......@@ -105,7 +109,7 @@ class userManagement extends management
static function lockUser (string $action, string $pwd, string $dn)
{
$method = passwordMethod::get_method($pwd, $dn);
if ($method instanceOf passwordMethod) {
if ($method instanceof passwordMethod) {
if (!$method->is_lockable()) {
$hn = $method->get_hash_name();
if (is_array($hn)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment