Populate 'user' property of every module instance with current user info

This commit is contained in:
Kijin Sung 2017-02-10 21:08:05 +09:00
parent 5f7b4837dc
commit 45e930f04c
2 changed files with 20 additions and 0 deletions

View file

@ -26,6 +26,20 @@ class ModuleObject extends Object
var $module_config = NULL;
var $ajaxRequestMethod = array('XMLRPC', 'JSON');
var $gzhandler_enable = TRUE;
var $user = FALSE;
/**
* Constructor
*
* @param int $error Error code
* @param string $message Error message
* @return void
*/
function __construct($error = 0, $message = 'success')
{
$this->user = Context::get('logged_info');
parent::__construct($error, $message);
}
/**
* setter to set the name of module