From f71d39467f353ae5f67984c0809bbda5ff7968b0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 11 Aug 2013 12:55:19 +0200 Subject: 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 --- application/models/muser.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'application/models/muser.php') 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; -- cgit v1.2.3-24-g4f1b