I am trying to create a login system inside Symfony2 that requires both a Username/Password and a PIN. This means that when the user presses the login submit button Symfony2 should check against the username, password and the pin.

我正在尝试在Symfony2中创建一个需要用户名/密码和PIN的登录系统。这意味着当用户按下登录提交按钮时,Symfony2应该检查用户名,密码和引脚。

I don't really know where to start. I have a valid login system working with just a username/password using the UserInterface.

我真的不知道从哪里开始。我有一个有效的登录系统,使用UserInterface只使用用户名/密码。

Any ideas? Thanks.

有任何想法吗?谢谢。

1 个解决方案

#1


0

Follow this tutorial In the listener catch the error with a RedirectResponse to your login page and set a session variable with:

遵循本教程在侦听器中使用RedirectResponse捕获错误到您的登录页面并设置会话变量:

$session->set(SecurityContext::AUTHENTICATION_ERROR, array('message' => 'The details entered are invalid'));

更多相关文章

  1. php扫马、内网查mysql数据库账号密码(内网webshell渗透)
  2. 如何使用用户名作为子域名创建子域?
  3. jQuery PHP:检查用户名是否已经存在
  4. PHP万能密码登陆
  5. 从mysql中选择加密密码
  6. Zend数据库适配器-未捕获异常-堆栈跟踪显示用户名和密码
  7. Windows下 MySQL更新密码
  8. linux下mysql的root密码忘记,怎么改root密码
  9. Linux下修改MySQL初始密码、开启远程登录、授权远程登录用户

随机推荐

  1. MySQL、JDBC安装以及用java连接
  2. mySql中SUBSTRING_INDEX函数用法
  3. mysql数据库之单表查询
  4. MYSQL如何导出存储过程和触发器?
  5. mysql百万级查询怎么样才能快速查询呢
  6. MySQL5.7 GTID学习笔记
  7. 如何更改select语句中的列值
  8. shell脚本中mysqldump的基本使用
  9. Navicat连接mysql8出现1251错误
  10. 根据mysql中的另一列获取百分比列