where('mem_no', $memNo)->first(); } public function emailsMatch(int $memNo, string $email): bool { $mem = $this->findByMemNo($memNo); if (!$mem || empty($mem->email)) return false; return strcasecmp((string)$mem->email, $email) === 0; } }