Skip to content

Commit

Permalink
#ITC-1556 Delete user in edit view doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
ibering committed Oct 13, 2017
1 parent 64cc0c3 commit 6b5ffe4
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 6b5ffe4

Please sign in to comment.