Enable/Disable users

This commit is contained in:
Frederic Guillot
2016-02-13 15:38:35 -05:00
parent 567d623446
commit 6161eaef9e
31 changed files with 541 additions and 72 deletions

View File

@@ -32,7 +32,8 @@ class User extends Base
$this->helper->layout->app('user/index', array(
'title' => t('Users').' ('.$paginator->getTotal().')',
'paginator' => $paginator,
)));
)
));
}
/**
@@ -404,30 +405,4 @@ class User extends Base
'user' => $user,
)));
}
/**
* Remove a user
*
* @access public
*/
public function remove()
{
$user = $this->getUser();
if ($this->request->getStringParam('confirmation') === 'yes') {
$this->checkCSRFParam();
if ($this->user->remove($user['id'])) {
$this->flash->success(t('User removed successfully.'));
} else {
$this->flash->failure(t('Unable to remove this user.'));
}
$this->response->redirect($this->helper->url->to('user', 'index'));
}
$this->response->html($this->helper->layout->user('user/remove', array(
'user' => $user,
)));
}
}