View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Starter Template</title> | |
<link href="style.css" rel="stylesheet"> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
View gist:3dd39392f8b9ab15c0c1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function manualLoginAction() | |
{ | |
$user = $this->getDoctrine()->getRepository('UserBundle:User')->find(1); | |
$token = new UsernamePasswordToken($user, $user->getPassword(), 'admin_area', $user->getRoles()); | |
$this->get('security.context')->setToken($token); | |
$request = $this->get('request'); | |
$event = new InteractiveLoginEvent($request, $token); | |
$this->get("event_dispatcher")->dispatch('security.interactive_login', $event); | |