- Remove tutorialModel::checkNovice and its unit test, it's not used.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The model file of tutorial module of ZenTaoCMS.
|
||||
*
|
||||
@@ -11,27 +12,6 @@
|
||||
*/
|
||||
class tutorialModel extends model
|
||||
{
|
||||
/**
|
||||
* 检查新手模式配置。
|
||||
* Check novice mode config.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkNovice(): bool
|
||||
{
|
||||
$account = $this->app->user->account;
|
||||
if($account == 'guest') return false;
|
||||
if(!empty($this->app->user->modifyPassword)) 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.novice', 0);
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新手模式产品键值对。
|
||||
* Get tutorial product pairs.
|
||||
|
||||
Reference in New Issue
Block a user