示例#1
0
 /**
  * @Route("/created")
  * @Route("/created/")
  */
 public function createdAction($getUsername, $getPassword, $getEmail)
 {
     $account = new account();
     $account->setUsername($getUsername);
     $account->setPassword(strtoupper(sha1($getUsername . ":" . $getPassword)));
     $account->setEmail($getEmail);
     $em = $this->getDoctrine()->getManager();
     $em->persist($account);
     $em->flush();
     return $this->render('twitter/success_created.html.twig', array('getUsername' => $getUsername, 'getEmail' => $getEmail, 'current_year' => date("Y")));
 }
示例#2
0
                    $email = isset($_POST['email']) ? $_POST['email'] : '';
                    $username = helper::clearText($username);
                    $username = helper::escapeText($username);
                    $fullname = helper::clearText($fullname);
                    $fullname = helper::escapeText($fullname);
                    $location = helper::clearText($location);
                    $location = helper::escapeText($location);
                    $balance = helper::clearInt($balance);
                    $fb_page = helper::clearText($fb_page);
                    $fb_page = helper::escapeText($fb_page);
                    $instagram_page = helper::clearText($instagram_page);
                    $instagram_page = helper::escapeText($instagram_page);
                    $email = helper::clearText($email);
                    $email = helper::escapeText($email);
                    if ($authToken === helper::getAuthenticityToken()) {
                        $account->setUsername($username);
                        $account->setFullname($fullname);
                        $account->setLocation($location);
                        $account->setBalance($balance);
                        $account->setFacebookPage($fb_page);
                        $account->setInstagramPage($instagram_page);
                        $account->setEmail($email);
                    }
                }
                header("Location: /admin/profile.php/?id=" . $accountInfo['id']);
                exit;
        }
    }
} else {
    header("Location: /admin/main.php");
}