Fixed editing own user

This commit is contained in:
Matias Griese
2020-02-03 12:15:51 +02:00
parent c92290adcd
commit cd286ad30c

View File

@@ -150,8 +150,11 @@ class Admin
$directory = $managed ? $flex->getDirectory('user-accounts') : null;
/** @var UserObject|null $test */
$test = $directory ? $directory->createObject($user->toArray(), $user->username) : null;
$test = $directory ? $directory->getObject($user->username) : null;
if ($test) {
$test = clone $test;
$test->access = $user->access;
$test->groups = $user->groups;
$test->authenticated = $user->authenticated;
$test->authorized = $user->authorized;
$user = $test;