Skip to content

Commit

Permalink
Merge pull request #705 from it-novum/ITC-1556
Browse files Browse the repository at this point in the history
#ITC-1556 Delete user in edit view doesn't work
  • Loading branch information
ibering authored Oct 13, 2017
2 parents 64cc0c3 + 6b5ffe4 commit 0aa7088
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ function ($container_id, $permission_level) {
$this->request->data = $this->User->find('first', $options);
$containers = $this->Tree->easyPath($this->MY_RIGHTS, OBJECT_USER, [], $this->hasRootPrivileges);
$selectedContainers = ($this->request->data('Container')) ? Hash::extract($this->request->data['Container'], '{n}.id') : Hash::extract($permissionsUser['ContainerUserMembership'], '{n}.container_id');
$this->set(compact(['containers', 'selectedContainers']));
$this->set(compact(['containers', 'selectedContainers', 'permissionsUser']));
$this->request->data['User']['password'] = '';

$type = 'local';
Expand Down
2 changes: 1 addition & 1 deletion app/View/Users/edit.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<h2><?php echo $this->action == 'edit' ? __('Edit') : __('Add') ?><?php echo __('User'); ?></h2>
<div class="widget-toolbar" role="menu">
<?php if ($this->Acl->hasPermission('delete')): ?>
<?php echo $this->Utils->deleteButton(); ?>
<?php echo $this->Utils->deleteButton(null, $permissionsUser['User']['id']); ?>
<?php endif; ?>
<?php echo $this->Utils->backButton(); ?>
</div>
Expand Down

0 comments on commit 0aa7088

Please sign in to comment.