Commit 8671918d authored by dockx thibault's avatar dockx thibault
Browse files

Merge branch...

Merge branch '6322-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen' into 'dev'

Resolve "[Template] - Issue when creating a template with empty password, error message should not be seen"

See merge request fusiondirectory/fd-plugins!1082
Showing with 9 additions and 6 deletions
+9 -6
...@@ -224,12 +224,15 @@ class supannAccountStatus extends simplePlugin implements UserTabLockingAction ...@@ -224,12 +224,15 @@ class supannAccountStatus extends simplePlugin implements UserTabLockingAction
*/ */
protected function processAccountState (string $state): void protected function processAccountState (string $state): void
{ {
if ($state === 'A') { // This should only be verified under non templating logic
// Unlock account if (!$this->is_template) {
userManagement::lockUser('unlock', $this->parent->getBaseObject()->userPassword, $this->dn); if ($state === 'A') {
} elseif (in_array($state, ['S', 'I'], TRUE)) { // Unlock account
// Lock account userManagement::lockUser('unlock', $this->parent->getBaseObject()->userPassword, $this->dn);
userManagement::lockUser('lock', $this->parent->getBaseObject()->userPassword, $this->dn, FALSE); } elseif (in_array($state, ['S', 'I'], TRUE)) {
// Lock account
userManagement::lockUser('lock', $this->parent->getBaseObject()->userPassword, $this->dn, FALSE);
}
} }
} }
......
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