* finish task #2524.

This commit is contained in:
wangyidong
2016-04-12 11:23:05 +08:00
parent b1e147fec3
commit cb5d368c48
9 changed files with 91 additions and 2 deletions
+19
View File
@@ -42,4 +42,23 @@ class miscModel extends model
}
return $tables;
}
/**
* 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;
}
}