function action_feedback($do_send = null, $name = null, $email = null, $text = null, $message = null, $submitted = null) { if ($do_send) { if ($name && $email && $text && !$message) { mail(ConfigurationEntry::getEntry(new ConfigurationKey(ConfigurationKey::ADMIN_EMAIL))->getValue(), "phoebius.org feedback from {$_REQUEST['name']}", $_REQUEST['text'], join("\r\n", array('From: "Phoebius.org feedback" <*****@*****.**>', 'Reply-To: "' . $_REQUEST['name'] . '" <' . $_REQUEST['email'] . '>'))); } return new RedirectResult(new HttpUrl('/feedback/?submitted=1')); } $this->getModel()->append(array('submitted' => $submitted)); return 'feedback'; }
private function tryLogIn($email, $password) { if ($email == ConfigurationEntry::getEntry(new ConfigurationKey(ConfigurationKey::ADMIN_EMAIL))->getValue() && $password == ConfigurationEntry::getEntry(new ConfigurationKey(ConfigurationKey::ADMIN_PASSWORD))->getValue()) { $this->authorizeAsAdmin($email); return true; } }