Browse Source

return false, if token is not found in database

master
Dom SP 3 years ago
parent
commit
0a8fde4e56
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      app/controller/email.php

+ 8
- 5
app/controller/email.php View File

@@ -19,15 +19,18 @@ class Email {
$db = new \DB\Jig($token_db,\DB\Jig::FORMAT_JSON);
$formcall = new \DB\Jig\Mapper($db,'form_calls');

$formcall->load(['@token = ?', $token]);
$f3->config($formcall->form);
$this->path = $formcall->path;

return true;
if($formcall->load(['@token = ?', $token])) {
$f3->config($formcall->form);
$this->path = $formcall->path;
return true;
} else {
return false;
}
}
function get_post_data() {
$f3 = \Base::instance();
$token = $f3->get('POST.xss-token');
if (ctype_alnum( $token )) {
if ($this->load_form_config($token)) {

Loading…
Cancel
Save