1
This commit is contained in:
parent
e90035915b
commit
293b30cb65
@ -165,10 +165,17 @@ class BaseAuthedController extends BaseController {
|
|||||||
return phpcommon\extractChannel($this->_getAccountId());
|
return phpcommon\extractChannel($this->_getAccountId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function _getAddress(){
|
public function _getAddress()
|
||||||
|
{
|
||||||
return $this->_getOpenId();
|
return $this->_getOpenId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function _isValidAddress()
|
||||||
|
{
|
||||||
|
$address = $this->_getAddress();
|
||||||
|
return !empty($address);
|
||||||
|
}
|
||||||
|
|
||||||
public function _getSessionId()
|
public function _getSessionId()
|
||||||
{
|
{
|
||||||
return $this->sessionId;
|
return $this->sessionId;
|
||||||
|
@ -36,8 +36,7 @@ class BlockChainController extends BaseAuthedController {
|
|||||||
public function _handlePre()
|
public function _handlePre()
|
||||||
{
|
{
|
||||||
parent::_handlePre();
|
parent::_handlePre();
|
||||||
if (getReqVal('a', '') != 'getTransactionList' &&
|
if (getReqVal('a', '') != 'getTransactionList' && !myself()->_isValidAddress()) {
|
||||||
myself()->_getChannel() != BC_CHANNEL) {
|
|
||||||
die(json_encode(array(
|
die(json_encode(array(
|
||||||
'errcode' => 501,
|
'errcode' => 501,
|
||||||
'errmsg' => 'you are not a wallet user'
|
'errmsg' => 'you are not a wallet user'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user