login($form["email"], $form["password"])){
$url = $plugin->getURL("home");
$url = $plugin->getURL("home");
echo "
";
exit;
}else{
echo "";
showLoginForm($form["email"]);
}
}else{
$email = get_option('admin_email');
try {
$file = plugin_dir_path(__FILE__) . 'fortynuggets.key';
if (file_exists($file)){
$data = json_decode(file_get_contents($file));
$email = $data->email;
}
}catch(Exception $e) {}
showLoginForm($email);
}
function showLoginForm($email){
?>