* adjust code.
This commit is contained in:
@@ -11,6 +11,25 @@
|
||||
*/
|
||||
class tutorialModel extends model
|
||||
{
|
||||
/**
|
||||
* Check novice.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkNovice()
|
||||
{
|
||||
$account = $this->app->user->account;
|
||||
if($account == 'guest') return false;
|
||||
|
||||
$count = $this->dao->select('count(*) as count')->from(TABLE_ACTION)->where('actor')->eq($account)->fetch('count');
|
||||
if($count < 10) return true;
|
||||
|
||||
$this->loadModel('setting')->setItem($account . '.common.global.nevice', 'false');
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tutorial product pairs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user