Masuk ke ODJ-ku

[insert_php]
require “/home/orarija1/public_html/odj-ku/includes.php”;

if (empty($_POST)) {
print “


Callsign

Password


“;
} else {
$odj_callsign = strtolower($_POST[‘callsign’]);
$odj_password = $_POST[‘password’];
$creds = array();
$creds[‘user_login’] = $odj_callsign;
$creds[‘user_password’] = $odj_password;
$creds[‘remember’] = true;
$odj_return = wp_signon($creds, false);
if (is_wp_error($odj_return)) {
print “Gagal masuk karena callsign belum terdaftar atau password salah. ” .
” .
“;
} else {
wp_set_current_user($odj_return->ID);
wp_set_auth_cookie($odj_return->ID);
wp_redirect(‘/index.php/odjku/selamat-datang/’);
}
}
[/insert_php]