示例#1
0
 public static function createUserLog($params)
 {
     $resultInfo = array();
     $userLog = new UserLog();
     $userLog->attributes = $params;
     if (!$userLog->save()) {
         $resultInfo['status'] = CommonService::$ApiResult['FAIL'];
         $resultInfo['detail'] = $userLog->getErrors();
     } else {
         $resultInfo['status'] = CommonService::$ApiResult['SUCCESS'];
         $resultInfo['detail'] = array('id' => $userLog->id);
     }
     return $resultInfo;
 }