cfmgrv3 init...3
This commit is contained in:
parent
25ab3b8faf
commit
dc41b7c76a
@ -6,7 +6,6 @@ use App\Models\Cloudflare\API\AuthModel;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use App\Libraries\Log\Log;
|
||||
|
||||
class AuthController extends APIController
|
||||
{
|
||||
|
||||
@ -172,20 +172,22 @@ class CommonController extends BaseController
|
||||
}
|
||||
protected function update_validate($entity)
|
||||
{
|
||||
|
||||
//변경된 값 적용
|
||||
|
||||
$this->_viewDatas['fieldDatas'] = array();
|
||||
foreach ($this->_viewDatas['fields'] as $field) {
|
||||
$logs = array();
|
||||
$value = rtrim($this->request->getVar($field));
|
||||
if ($entity->$field != $value) {
|
||||
$log = "{$entity->getTitle()}의 {$field} : {$entity->$field}=>{$value}";
|
||||
//암호는 보안상 log에 남지 않게하기 위함
|
||||
if ($field != 'passwd') {
|
||||
Log::add("info", $log);
|
||||
}
|
||||
array_push($logs, $log);
|
||||
$entity->$field = $this->_viewDatas['fieldDatas'][$field] = $value;
|
||||
$log = "{$entity->getTitle()}의 {$field} : {$entity->$field}=>{$value}";
|
||||
//암호는 보안상 log에 남지 않게하기 위함
|
||||
if ($field != 'passwd') {
|
||||
Log::add("info", $log);
|
||||
}
|
||||
array_push($logs, $log);
|
||||
$entity->$field = $this->_viewDatas['fieldDatas'][$field] = $value;
|
||||
}
|
||||
// throw new \Exception(var_export($this->_viewDatas['fieldDatas'], true));
|
||||
if (!$entity->hasChanged()) {
|
||||
throw new \Exception("새로 변경된 값이 없습니다." . var_export($logs, true));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user