36 lines
719 B
PHP
36 lines
719 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Hura8\Components\User\Controller;
|
||
|
|
|
||
|
|
|
||
|
|
use Hura8\Components\User\Model\UserModel;
|
||
|
|
use Hura8\System\Controller\aEntityBaseController;
|
||
|
|
use Hura8\System\Security\Cookie;
|
||
|
|
|
||
|
|
|
||
|
|
class bUserController extends aEntityBaseController
|
||
|
|
{
|
||
|
|
|
||
|
|
protected $web_user_id = '';
|
||
|
|
|
||
|
|
protected $objUserModel;
|
||
|
|
|
||
|
|
public function __construct() {
|
||
|
|
$this->web_user_id = self::getWebUserId();
|
||
|
|
$this->objUserModel = new UserModel($this->web_user_id );
|
||
|
|
parent::__construct($this->objUserModel);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @description this value is set by hura.js for anonymous web users
|
||
|
|
* @return string
|
||
|
|
*/
|
||
|
|
public static function getWebUserId() {
|
||
|
|
return Cookie::get("uID", '');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|