summaryrefslogtreecommitdiffstats
path: root/application/models/muser.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-08-11 12:55:19 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-08-11 14:49:30 +0200
commitf71d39467f353ae5f67984c0809bbda5ff7968b0 (patch)
tree7d3bc34112ea3e10d413db3b662f66e762e3d914 /application/models/muser.php
parenta147f1c43beb242af3d54f07ca32e88c5ffc5d8e (diff)
Remove api keys dependency on username
We don't need it and getting the user name from the user drivers is way more complicated. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/models/muser.php')
-rw-r--r--application/models/muser.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/application/models/muser.php b/application/models/muser.php
index 312d895e5..843b7cad6 100644
--- a/application/models/muser.php
+++ b/application/models/muser.php
@@ -97,18 +97,15 @@ class Muser extends CI_Model {
{
$this->require_session();
- // FIXME: get username/id from duser or move them to apikeys table
- // (users is empty when using any other driver than duser_db)
$query = $this->db->query("
- SELECT a.user userid, u.username
+ SELECT a.user userid
FROM apikeys a
- JOIN users u on a.user = u.id
WHERE a.key = ?
", array($apikey))->row_array();
if (isset($query["userid"])) {
$this->session->set_userdata('logged_in', true);
- $this->session->set_userdata('username', $query["username"]);
+ $this->session->set_userdata('username', "");
$this->session->set_userdata('userid', $query["userid"]);
$this->session->set_userdata('access_level', 'apikey');
return true;