diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-07-15 12:40:42 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-07-15 12:40:42 +0200 |
commit | 346caed594c7de29017a96b7d76f35be2539f4e3 (patch) | |
tree | da0869cf9c69ea6e56adb891467084e56558038e /application/controllers | |
parent | 672dc5f6d1b9f1c5d2ec8e4208e02986768af85c (diff) |
user/test_login: Allow clients to test login credentials
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/user.php | 12 |
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(); |