summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/user.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/application/controllers/user.php b/application/controllers/user.php
index f52e9c0b1..21b58cf93 100644
--- a/application/controllers/user.php
+++ b/application/controllers/user.php
@@ -41,6 +41,18 @@ class User extends CI_Controller {
$this->load->view('footer', $this->data);
}
+ function test_login()
+ {
+ $username = $this->input->post('username');
+ $password = $this->input->post('password');
+
+ if ($this->muser->login($username, $password)) {
+ $this->output->set_status_header(204);
+ } else {
+ $this->output->set_status_header(401);
+ }
+ }
+
function login()
{
$this->muser->require_session();