我在我的项目中使用 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

10-08 07:59