php - 如何在 Symfony 中为 sfGuard 用户创建自定义登录?

标签 php symfony1 sfguard

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

相关文章:

php - symfony 中的自定义验证器

php - 选择 Zend 还是 Symfony?为什么?

php - 向安全操作发送 POST 请求

symfony1 - sfDoctrineGuardPlugin 在数据转储后从 fixture 重新散列密码

php - 如何从 sfUser 获取 id?

php - 使我的电子邮件表格列响应流畅的问题

php - 为了实现旧版 PHP 和新版 SQL Server 之间的兼容性,是否应该使用 FreeTDS 驱动程序而不是 MS SQL 驱动程序?

php - 存储图形数据的最有效方法

symfony1 - Symfony 无法打开我的 sfDoctrineDatabase.class.php

php - 使用 PHP 的最简单的双向加密