mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Populate an empty SessionHelper object if not logged in
This commit is contained in:
parent
11883fb965
commit
03866c7777
3 changed files with 3 additions and 3 deletions
|
|
@ -1182,7 +1182,7 @@ class ModuleHandler extends Handler
|
|||
// Populate default properties
|
||||
if($oModule->user === false)
|
||||
{
|
||||
$oModule->user = Context::get('logged_info');
|
||||
$oModule->user = Context::get('logged_info') ?: new Rhymix\Framework\Helpers\SessionHelper;
|
||||
}
|
||||
|
||||
// Load language files for the class
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class ModuleObject extends Object
|
|||
*/
|
||||
function __construct($error = 0, $message = 'success')
|
||||
{
|
||||
$this->user = Context::get('logged_info');
|
||||
$this->user = Context::get('logged_info') ?: new Rhymix\Framework\Helpers\SessionHelper;
|
||||
parent::__construct($error, $message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue