- P2-19: LocalGovernment edit/update/delete 추가, 목록에 수정/비활성 버튼 - P2-20: PasswordChange 컨트롤러 + View (현재 비밀번호 검증 후 변경) - P2-21: 로그인 5회 연속 실패 시 30분 lock - member 테이블에 mb_login_fail_count, mb_locked_until 컬럼 추가 - Auth::login에 lock 체크/실패 카운트 증가/성공 시 리셋 로직 - E2E 테스트 4개 전체 통과 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
967 B
PHP
47 lines
967 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
class MemberModel extends Model
|
|
{
|
|
protected $table = 'member';
|
|
protected $primaryKey = 'mb_idx';
|
|
protected $returnType = 'object';
|
|
protected $useTimestamps = false;
|
|
protected $allowedFields = [
|
|
'mb_id',
|
|
'mb_passwd',
|
|
'mb_name',
|
|
'mb_email',
|
|
'mb_phone',
|
|
'mb_lang',
|
|
'mb_level',
|
|
'mb_group',
|
|
'mb_lg_idx',
|
|
'mb_state',
|
|
'mb_regdate',
|
|
'mb_latestdate',
|
|
'mb_leavedate',
|
|
'mb_login_fail_count',
|
|
'mb_locked_until',
|
|
];
|
|
|
|
/**
|
|
* mb_id로 회원 조회
|
|
*/
|
|
public function findByLoginId(string $mbId): ?object
|
|
{
|
|
return $this->where('mb_id', $mbId)->first();
|
|
}
|
|
|
|
/**
|
|
* mb_id 중복 여부
|
|
*/
|
|
public function isIdExists(string $mbId): bool
|
|
{
|
|
return $this->where('mb_id', $mbId)->countAllResults() > 0;
|
|
}
|
|
}
|