我在我的项目中使用 Symfony 1.4 和 ORM 作为 Propel。我已经配置了 Settings.yml 来保护我的页面。但是我可以通过扩展所有 SfGuard 插件功能的操作来自定义登录/注销吗?我在 SymfonyLab 中找到了一篇文章, 但还不够清楚。
最佳答案
覆盖 sfGuard 登录 View 的最简单方法:
1) 在您的前端模块中创建一个名为“sfGuardAuth”的目录:
mkdir apps/frontend/modules/sfGuardAuth
mkdir apps/frontend/modules/sfGuardAuth/templates
2) 将默认模板从sfGuardPlugin 文件夹复制到新模块
cp plugins/sfGuardPlugin/modules/sfGuardAuth/templates/* apps/frontend/modules/sfGuardAuth/templates
3) 根据您的喜好编辑新文件
4)清除缓存
./symfony cc
关于php - 如何在 Symfony 中为 sfGuard 用户创建自定义登录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4154879/