Files
Recruitment-HC/dev/create-test-participant.php

10 lines
658 B
PHP

<?php
if(PHP_SAPI!=='cli') { http_response_code(404); exit; }
require __DIR__.'/../includes/candidate.php';
if(cq('SELECT DATABASE() name')->get_result()->fetch_assoc()['name']!=='recruitment_local') exit("Hanya untuk database preview lokal.\n");
$email='test@nurinda.local';
if(!cq('SELECT id FROM in_daper WHERE email=?','s',[$email])->get_result()->fetch_assoc()) {
cq('INSERT INTO in_daper(kode,nama,jk,email,nowa,posisi,cek,level,password) VALUES(99,?,?,?,?,?,0,0,?)','ssssss',['Peserta Test Nurinda','Pria',$email,'0800000000','Eksplorasi Psikotest',password_hash('NurindaTest2026!',PASSWORD_DEFAULT)]);
}
echo "Akun test siap: test@nurinda.local\n";