Begin implementing user management
This commit is contained in:
33
application/controllers/users.php
Normal file
33
application/controllers/users.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Controller for users.
|
||||
*
|
||||
* @author Eike Foken <kontakt@eikefoken.de>
|
||||
*
|
||||
*/
|
||||
class Users extends MY_Controller {
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->load->model('user');
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows a list of all users.
|
||||
*/
|
||||
public function index() {
|
||||
$data['users'] = $this->user->getAll();
|
||||
$this->load->view('admin/users/index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows admins to create a new user.
|
||||
*/
|
||||
public function create() {
|
||||
$this->load->view('admin/users/create');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user