You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
457 B
21 lines
457 B
<?php
|
|
|
|
namespace frontend\controllers;
|
|
|
|
use common\models\UserLogT;
|
|
use common\libs\MyLib;
|
|
|
|
class UserBaseController extends \frontend\controllers\BaseController
|
|
{
|
|
public function addUserLog($user_id, $content = '')
|
|
{
|
|
$row = new UserLogT();
|
|
|
|
$row->user_id = $user_id;
|
|
$row->content = $content;
|
|
$row->ip = MyLib::getIP();
|
|
|
|
if(!$row->save())
|
|
throw new \Exception('添加操作记录失败');
|
|
}
|
|
} |