verify($id, $passwd); } catch (Exception $e) { // Handle error more gracefully than the original die() error_log("User verification error: " . $e->getMessage()); return false; } } }