Skip to content

Commit 8d7d175

Browse files
committed
Added extra variable that holds the information about the API user
1 parent def1295 commit 8d7d175

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

application/libraries/REST_Controller.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ abstract class REST_Controller extends CI_Controller
130130
'html' => 'text/html',
131131
'csv' => 'application/csv'
132132
);
133+
134+
/**
135+
* Information about the current API user
136+
*
137+
* @var object
138+
*/
139+
protected $_apiuser;
133140

134141
/**
135142
* Developers can extend this class and add a check in here.
@@ -615,6 +622,8 @@ protected function _detect_api_key()
615622
isset($row->level) AND $this->rest->level = $row->level;
616623
isset($row->ignore_limits) AND $this->rest->ignore_limits = $row->ignore_limits;
617624

625+
$this->_apiuser = $row;
626+
618627
/*
619628
* If "is private key" is enabled, compare the ip address with the list
620629
* of valid ip addresses stored in the database.

0 commit comments

Comments
 (0)